using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using FAXCONTROLLib;
using Microsoft.Office.Core;
using System.Diagnostics;
using System.IO;
namespace ITD_FS
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class frmMain : System.Windows.Forms.Form
{
public FaxControlClass fsCheck = new FaxControlClass();
private XPExplorerBar.Expando expando2;
private XPExplorerBar.Expando expando3;
private XPExplorerBar.TaskPane taskPane1;
private XPExplorerBar.Expando expando1;
private XPExplorerBar.TaskItem taskItem1;
private XPExplorerBar.Expando expando4;
private XPExplorerBar.TaskItem taskItem2;
private XPExplorerBar.TaskItem taskItem3;
private XPExplorerBar.TaskItem taskItem4;
private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button btnSearch;
private System.Windows.Forms.Button btnContact;
private System.Windows.Forms.Button btnFax;
private System.Windows.Forms.Button btnAbout;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.ComponentModel.IContainer components;
private System.Windows.Forms.PrintDialog printDialog1;
// the way to handle parameters you don't care about in .NET
public object missing = System.Reflection.Missing.Value;
public object myTrue = true; // Print in background
public object myFalse = false;
public frmMain()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(frmMain));
this.expando2 = new XPExplorerBar.Expando();
this.taskItem1 = new XPExplorerBar.TaskItem();
this.expando3 = new XPExplorerBar.Expando();
this.taskPane1 = new XPExplorerBar.TaskPane();
this.expando1 = new XPExplorerBar.Expando();
this.taskItem2 = new XPExplorerBar.TaskItem();
this.taskItem3 = new XPExplorerBar.TaskItem();
this.taskItem4 = new XPExplorerBar.TaskItem();
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.expando4 = new XPExplorerBar.Expando();
this.textBox1 = new System.Windows.Forms.TextBox();
this.btnSearch = new System.Windows.Forms.Button();
this.btnContact = new System.Windows.Forms.Button();
this.btnFax = new System.Windows.Forms.Button();
this.btnAbout = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.printDialog1 = new System.Windows.Forms.PrintDialog();
((System.ComponentModel.ISupportInitialize)(this.e xpando2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.e xpando3)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.t askPane1)).BeginInit();
this.taskPane1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.e xpando1)).BeginInit();
this.expando1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.e xpando4)).BeginInit();
this.expando4.SuspendLayout();
this.SuspendLayout();
//
// expando2
//
this.expando2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Wind ows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.expando2.Animate = true;
this.expando2.CustomSettings.WatermarkAlignment = System.Drawing.ContentAlignment.MiddleRight;
this.expando2.Font = new System.Drawing.Font("Tahoma", 8.25F);
this.expando2.Location = new System.Drawing.Point(12, 12);
this.expando2.Name = "expando2";
this.expando2.TabIndex = 0;
this.expando2.TitleImage = ((System.Drawing.Image)(resources.GetObject("expan do2.TitleImage")));
//
// taskItem1
//
this.taskItem1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Wind ows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.taskItem1.BackColor = System.Drawing.Color.Transparent;
this.taskItem1.Font = new System.Drawing.Font("Tahoma", 8.25F);
this.taskItem1.Image = null;
this.taskItem1.Location = new System.Drawing.Point(16, 40);
this.taskItem1.Name = "taskItem1";
this.taskItem1.Size = new System.Drawing.Size(152, 16);
this.taskItem1.TabIndex = 0;
this.taskItem1.Text = "taskItem1";
this.taskItem1.Click += new System.EventHandler(this.taskItem1_Click_1);
//
// expando3
//
this.expando3.Font = new System.Drawing.Font("Tahoma", 8.25F);
this.expando3.Location = new System.Drawing.Point(336, 296);
this.expando3.Name = "expando3";
this.expando3.TabIndex = 1;
this.expando3.Text = "expando3";
//
// taskPane1
//
this.taskPane1.AutoScrollMargin = new System.Drawing.Size(12, 12);
this.taskPane1.Dock = System.Windows.Forms.DockStyle.Fill;
this.taskPane1.Expandos.AddRange(new XPExplorerBar.Expando[] {
this.expando1,
this.expando4});
this.taskPane1.Location = new System.Drawing.Point(0, 0);
this.taskPane1.Name = "taskPane1";
this.taskPane1.Size = new System.Drawing.Size(656, 462);
this.taskPane1.TabIndex = 1;
this.taskPane1.Text = "taskPane1";
this.taskPane1.Click += new System.EventHandler(this.taskPane1_Click);
//
// expando1
//
this.expando1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Wind ows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.expando1.Animate = true;
this.expando1.CustomSettings.WatermarkAlignment = System.Drawing.ContentAlignment.MiddleRight;
this.expando1.ExpandedHeight = 120;
this.expando1.Font = new System.Drawing.Font("Tahoma", 8.25F);
this.expando1.Items.AddRange(new System.Windows.Forms.Control[] {
this.taskItem1,
this.taskItem2,
this.taskItem3,
this.taskItem4,
this.pictureBox1});
this.expando1.Location = new System.Drawing.Point(12, 12);
this.expando1.Name = "expando1";
this.expando1.Size = new System.Drawing.Size(632, 120);
this.expando1.TabIndex = 0;
this.expando1.Text = "Information";
this.expando1.TitleImage = ((System.Drawing.Image)(resources.GetObject("expan do1.TitleImage")));
this.expando1.StateChanged += new XPExplorerBar.ExpandoEventHandler(this.expando1_St ateChanged);
//
// taskItem2
//
this.taskItem2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Wind ows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.taskItem2.BackColor = System.Drawing.Color.Transparent;
this.taskItem2.CustomSettings.FontDecoration = System.Drawing.FontStyle.Regular;
this.taskItem2.Image = null;
this.taskItem2.Location = new System.Drawing.Point(456, 64);
this.taskItem2.Name = "taskItem2";
this.taskItem2.Size = new System.Drawing.Size(112, 16);
this.taskItem2.TabIndex = 1;
this.taskItem2.Text = "taskItem2";
//
// taskItem3
//
this.taskItem3.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Wind ows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.taskItem3.BackColor = System.Drawing.Color.Transparent;
this.taskItem3.CustomSettings.FontDecoration = System.Drawing.FontStyle.Regular;
this.taskItem3.Image = null;
this.taskItem3.Location = new System.Drawing.Point(456, 40);
this.taskItem3.Name = "taskItem3";
this.taskItem3.TabIndex = 2;
this.taskItem3.Text = "taskItem3";
//
// taskItem4
//
this.taskItem4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Wind ows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.taskItem4.BackColor = System.Drawing.Color.Transparent;
this.taskItem4.CustomSettings.FontDecoration = System.Drawing.FontStyle.Regular;
this.taskItem4.Image = null;
this.taskItem4.Location = new System.Drawing.Point(456, 88);
this.taskItem4.Name = "taskItem4";
this.taskItem4.Size = new System.Drawing.Size(112, 16);
this.taskItem4.TabIndex = 3;
this.taskItem4.Text = "Clock";
//
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictu reBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(576, 56);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(48, 48);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchIma ge;
this.pictureBox1.TabIndex = 4;
this.pictureBox1.TabStop = false;
//
// expando4
//
this.expando4.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Wind ows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.expando4.Animate = true;
this.expando4.ExpandedHeight = 300;
this.expando4.Font = new System.Drawing.Font("Tahoma", 8.25F);
this.expando4.Items.AddRange(new System.Windows.Forms.Control[] {
this.textBox1,
this.btnSearch,
this.btnContact,
this.btnFax,
this.btnAbout,
this.label1,
this.label2,
this.label3,
this.label4,
this.label5,
this.label6,
this.label7,
this.label8});
this.expando4.Location = new System.Drawing.Point(12, 144);
this.expando4.Name = "expando4";
this.expando4.Size = new System.Drawing.Size(632, 300);
this.expando4.TabIndex = 1;
this.expando4.Text = "FAX Document";
this.expando4.TitleImage = ((System.Drawing.Image)(resources.GetObject("expan do4.TitleImage")));
this.expando4.StateChanged += new XPExplorerBar.ExpandoEventHandler(this.expando4_St ateChanged);
//
// textBox1
//
this.textBox1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.textBox1.ForeColor = System.Drawing.SystemColors.WindowText;
this.textBox1.Location = new System.Drawing.Point(16, 64);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(504, 21);
this.textBox1.TabIndex = 0;
this.textBox1.Text = "";
//
// btnSearch
//
this.btnSearch.BackColor = System.Drawing.Color.WhiteSmoke;
this.btnSearch.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnSearch.Image = ((System.Drawing.Image)(resources.GetObject("btnSe arch.Image")));
this.btnSearch.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btnSearch.Location = new System.Drawing.Point(528, 64);
this.btnSearch.Name = "btnSearch";
this.btnSearch.Size = new System.Drawing.Size(96, 21);
this.btnSearch.TabIndex = 1;
this.btnSearch.Text = "Browse";
this.btnSearch.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click);
//
// btnContact
//
this.btnContact.BackColor = System.Drawing.Color.WhiteSmoke;
this.btnContact.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnContact.Image = ((System.Drawing.Image)(resources.GetObject("btnCo ntact.Image")));
this.btnContact.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btnContact.Location = new System.Drawing.Point(528, 176);
this.btnContact.Name = "btnContact";
this.btnContact.Size = new System.Drawing.Size(96, 40);
this.btnContact.TabIndex = 2;
this.btnContact.Text = "FAX Info";
this.btnContact.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnContact.Click += new System.EventHandler(this.btnContact_Click);
//
// btnFax
//
this.btnFax.BackColor = System.Drawing.Color.WhiteSmoke;
this.btnFax.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnFax.Image = ((System.Drawing.Image)(resources.GetObject("btnFa x.Image")));
this.btnFax.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btnFax.Location = new System.Drawing.Point(528, 112);
this.btnFax.Name = "btnFax";
this.btnFax.Size = new System.Drawing.Size(96, 40);
this.btnFax.TabIndex = 3;
this.btnFax.Text = "Send FAX";
this.btnFax.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnFax.Click += new System.EventHandler(this.btnFax_Click);
//
// btnAbout
//
this.btnAbout.BackColor = System.Drawing.Color.WhiteSmoke;
this.btnAbout.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAbout.Image = ((System.Drawing.Image)(resources.GetObject("btnAb out.Image")));
this.btnAbout.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.btnAbout.Location = new System.Drawing.Point(528, 240);
this.btnAbout.Name = "btnAbout";
this.btnAbout.Size = new System.Drawing.Size(96, 40);
this.btnAbout.TabIndex = 4;
this.btnAbout.Text = "About Us";
this.btnAbout.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.btnAbout.Click += new System.EventHandler(this.btnAbout_Click);
//
// label1
//
this.label1.Location = new System.Drawing.Point(16, 128);
this.label1.Name = "label1";
this.label1.TabIndex = 5;
this.label1.Text = "Number of pages :";
//
// label2
//
this.label2.Location = new System.Drawing.Point(16, 160);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(112, 23);
this.label2.TabIndex = 6;
this.label2.Text = "Number of sections :";
//
// label3
//
this.label3.Location = new System.Drawing.Point(16, 192);
this.label3.Name = "label3";
this.label3.TabIndex = 7;
this.label3.Text = "Spelling Errors :";
//
// label4
//
this.label4.Location = new System.Drawing.Point(16, 224);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(112, 23);
this.label4.TabIndex = 8;
this.label4.Text = "Grammatical Errors :";
//
// label5
//
this.label5.Location = new System.Drawing.Point(136, 128);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(312, 23);
this.label5.TabIndex = 9;
//
// label6
//
this.label6.Location = new System.Drawing.Point(136, 160);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(312, 23);
this.label6.TabIndex = 10;
//
// label7
//
this.label7.Location = new System.Drawing.Point(136, 192);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(312, 23);
this.label7.TabIndex = 11;
//
// label8
//
this.label8.Location = new System.Drawing.Point(136, 224);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(312, 23);
this.label8.TabIndex = 12;
//
// timer1
//
this.timer1.Enabled = true;
this.timer1.Interval = 1000;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
//
// frmMain
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.BackColor = System.Drawing.SystemColors.Window;
this.ClientSize = new System.Drawing.Size(656, 462);
this.Controls.Add(this.taskPane1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this. Icon")));
this.MaximizeBox = false;
this.Name = "frmMain";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScree n;
this.Text = "ITD-FS :: IT Developers - Fax Service";
this.Closing += new System.ComponentModel.CancelEventHandler(this.frmM ain_Closing);
this.Load += new System.EventHandler(this.frmMain_Load);
((System.ComponentModel.ISupportInitialize)(this.e xpando2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.e xpando3)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.t askPane1)).EndInit();
this.taskPane1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.e xpando1)).EndInit();
this.expando1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.e xpando4)).EndInit();
this.expando4.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.Run(new frmMain());
}
private void frmMain_Load(object sender, System.EventArgs e)
{
if (fsCheck.IsFaxServiceInstalled)
{
taskItem1.Text = "Fax service installed.";
taskItem1.Enabled = false;
}
else
{
taskItem1.Text = "Fax service not installed.";
btnContact.Enabled = false;
btnFax.Enabled = false;
}
DateConvertor myConvertor = new DateConvertor();
taskItem2.Text = DateTime.Now.Year.ToString() + "/" + DateTime.Now.Month.ToString() + "/" + DateTime.Now.Day.ToString();
taskItem3.Text = myConvertor.ShamsiCompleteStringDate(DateTime.Now. Year,DateTime.Now.Month,DateTime.Now.Day);
}
private void taskItem1_Click(object sender, System.EventArgs e)
{
//fsCheck.InstallFaxService();
}
private void taskPane1_Click(object sender, System.EventArgs e)
{
}
private void expando4_StateChanged(object sender, XPExplorerBar.ExpandoEventArgs e)
{
}
private void expando1_StateChanged(object sender, XPExplorerBar.ExpandoEventArgs e)
{
}
private void timer1_Tick(object sender, System.EventArgs e)
{
taskItem4.Text = DateTime.Now.ToShortTimeString();
}
private void btnAbout_Click(object sender, System.EventArgs e)
{
System.Diagnostics.Process myProcess = new Process();
myProcess.StartInfo.RedirectStandardOutput=false;
myProcess.StartInfo.FileName=Application.StartupPa th.ToString() + "\\" + "ITDevelopers.exe";
myProcess.StartInfo.UseShellExecute=true;
myProcess.Start();
myProcess.Dispose();
}
private void btnSearch_Click(object sender, System.EventArgs e)
{
Word.ApplicationClass WordApp = new Word.ApplicationClass();
OpenFileDialog myBrowser = new OpenFileDialog();
myBrowser.Filter = "Microsoft Word files (*.doc)|*.doc";
//myBrowser.ShowDialog();
if (myBrowser.ShowDialog() == DialogResult.OK)
{
textBox1.Text = myBrowser.FileName;
// give any file name of your choice.
object fileName = myBrowser.FileName;
object readOnly = true;
object isVisible = true;
// Make word visible, so you can see what's happening
//WordApp.Visible = true;
// Open the document that was chosen by the dialog
Word.Document aDoc = WordApp.Documents.Open(ref fileName,
ref missing, ref readOnly, ref missing,
ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing,
ref missing, ref isVisible, ref missing, ref missing, ref missing, ref missing);
// compute number of document page
Word.WdStatistic stat = Word.WdStatistic.wdStatisticPages;
int num = aDoc.ComputeStatistics(stat, ref missing);
//
// MessageBox.Show(num.ToString());
// MessageBox.Show(aDoc.GrammaticalErrors.Count.ToStr ing());
// MessageBox.Show(aDoc.Sections.Count.ToString());
// MessageBox.Show(aDoc.SpellingErrors.Count.ToString ());
label5.Text = num.ToString();
label6.Text = aDoc.Sections.Count.ToString();
label7.Text = aDoc.SpellingErrors.Count.ToString();
label8.Text = aDoc.GrammaticalErrors.Count.ToString();
//This two line clear WINWORD.EXE process from processes list
aDoc.Close(ref myFalse, ref missing, ref missing);
}
WordApp.Quit(ref myFalse, ref missing, ref missing);
}
private void btnContact_Click(object sender, System.EventArgs e)
{
System.Diagnostics.Process myProcess = new Process();
myProcess.StartInfo.RedirectStandardOutput=false;
myProcess.StartInfo.FileName=System.Environment.Sy stemDirectory.ToString()+"\\"+"fxsclnt.exe";
myProcess.StartInfo.UseShellExecute=true;
myProcess.Start();
myProcess.Dispose();
}
private void btnFax_Click(object sender, System.EventArgs e)
{
if (textBox1.Text.Length > 0)
{
Word.ApplicationClass WordApp = new Word.ApplicationClass();
System.Drawing.Printing.PrintDocument myDoc = new System.Drawing.Printing.PrintDocument();
PrintDialog pd = new PrintDialog();
pd.Document = myDoc;
//pd.ShowDialog();
if (pd.ShowDialog() == DialogResult.OK)
{
//////////////////////////////////////////////////////////////////////////////////
// give any file name of your choice.
object fileName =textBox1.Text;
object readOnly = true;
object isVisible = true;
// Make word visible, so you can see what's happening
//WordApp.Visible = true;
// Open the document that was chosen by the dialog
Word.Document aDoc = WordApp.Documents.Open(ref fileName,
ref missing, ref readOnly, ref missing,
ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing,
ref missing, ref isVisible, ref missing, ref missing, ref missing, ref missing);
// compute number of document page
Word.WdStatistic stat = Word.WdStatistic.wdStatisticPages;
int num = aDoc.ComputeStatistics(stat, ref missing);
///////////////////////////////////////////////////////////////////////////////////////
// Set the active printer
WordApp.ActivePrinter = pd.PrinterSettings.PrinterName;
// Using PrintOutOld to be version independant
WordApp.ActiveDocument.PrintOutOld(ref myTrue,
ref myFalse, ref missing, ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref myFalse, ref missing, ref missing, ref missing);
// Make sure all of the documents are gone from the queue
while (WordApp.BackgroundPrintingStatus > 0)
{
System.Threading.Thread.Sleep(250);
}
//This two line clear WINWORD.EXE process from processes list
aDoc.Close(ref myFalse, ref missing, ref missing);
}
WordApp.Quit(ref myFalse, ref missing, ref missing);
}
else
{
MessageBox.Show("You should choose a file to send.");
}
}
private void frmMain_Closing(object sender, System.ComponentModel.CancelEventArgs e)
{
//WordApp.Quit(ref myFalse, ref missing, ref missing);
}
private void taskItem1_Click_1(object sender, System.EventArgs e)
{
fsCheck.InstallFaxService();
Application.Exit();
}
}
}
این کد یک فایل با پسوند doc را انتخاب و ارسال میکند.