Пример #1
0
        private void uiCommandManager1_CommandClick(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
        {
            try
            {
                Janus.Windows.UI.CommandBars.UICommandBar bar = uiCommandManager1.CommandBars["cbMergeToolbar"];
                if (bar.Commands.Contains(e.Command.Key) && bar.Commands[e.Command.Key].Commands.Count > 0)
                {
                    bar.Commands[e.Command.Key].Expand();
                }

                switch (e.Command.Key)
                {
                case "tsSaveIRP":
                    SaveIRP();
                    break;

                case "tsDeleteIRP":
                    DeleteIRP();
                    break;

                case "tsNewIRP":
                    NewIRP();
                    break;

                case "tsGoToBillingReview":
                    if (myOfficeMan.CurrentOffice.UsesBilling)
                    {
                        ucBase             ctl   = FileForm().MoreInfo("billingreview");
                        ucSRPBillingReview brCtl = (ucSRPBillingReview)ctl;
                        brCtl.MoreInfo("billingreview", CurrentRowIRP().SRPID, CurrentRowIRP().IRPId);
                    }
                    break;

                case "tsGoToSRP":
                    FileForm().MoreInfo("srp", CurrentRowIRP().SRPID);
                    break;

                case "cmdJumpToActivity":
                    fFile nFile = FileForm().MainForm.OpenFile(CurrentRowIRP().FileID);
                    nFile.MoreInfo("activity");
                    break;

                case "cmdJumpToTaxation":
                    fFile nFile1 = FileForm().MainForm.OpenFile(CurrentRowIRP().FileID);
                    nFile1.MoreInfo("irp", CurrentRowIRP().IRPId);
                    break;
                }
                if (e.Command.Key.StartsWith("cmdTaxRec"))
                {
                    CLAS.TaxingRow tr    = (CLAS.TaxingRow)e.Command.Tag;
                    fFile          nFile = FileForm().MainForm.OpenFile(tr.FileID);
                    nFile.MoreInfo("taxing", tr.TaxingID);
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Пример #2
0
        private void CreateUIToolBars(Dictionary <string, NBGIS.PluginEngine.IToolBarDef> Toolbars)
        {
            foreach (KeyValuePair <string, NBGIS.PluginEngine.IToolBarDef> toolbar in Toolbars)
            {
                NBGIS.PluginEngine.IToolBarDef nbToolbar = toolbar.Value;

                Janus.Windows.UI.CommandBars.UICommandBar uiToolbar = new Janus.Windows.UI.CommandBars.UICommandBar();

                uiToolbar.CommandManager = this.uiCommandManager;

                uiToolbar.CommandsStyle = Janus.Windows.UI.CommandBars.CommandStyle.TextImage;

                uiToolbar.Name = nbToolbar.Name;
                uiToolbar.Text = nbToolbar.Caption;
                //Tag=nbToolbar?
                uiToolbar.Tag     = nbToolbar;
                uiToolbar.Key     = nbToolbar.ToString();
                uiToolbar.Visible = nbToolbar.IsVisible;

                //将Command和Tool插入到Toolbar中
                NBGIS.PluginEngine.IItemDef itemDef = new NBGIS.PluginEngine.ItemDef();
                for (int i = 0; i < nbToolbar.ItemCount; i++)
                {
                    nbToolbar.GetItemInfo(i, itemDef);
                    Janus.Windows.UI.CommandBars.UICommand uiCmd = null;

                    //如果一个ICommand对象由于某些原因并没有正确产生,
                    //而在Toolbar或Menu中又存在它的名称
                    //获取该ICommand对象就会出现异常
                    try
                    {
                        //uiCmd = this.uiCommandManager.Commands[itemDef.ID];
                        uiCmd = this.uiCommandManager.Commands[i];
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(itemDef.ID + " Plugin" + " didn't load.\n" + " Message: " + ex.Message);
                    }
                    if (uiCmd != null)
                    {
                        if (itemDef.Group)
                        {
                            uiToolbar.Commands.AddSeparator();
                        }
                        uiToolbar.Commands.Add(uiCmd);
                    }
                }
            }
        }
//
//    #region Net Performance
//
//    void NetPerformanceInit()
//    {
//      PerfNet= new perfo();
//    }
//    void NetPerfoResultCB(string rx, string tx, string total)
//    {
//      statusBar1.Panels[1].Text = tx + " TX";
//      statusBar1.Panels[2].Text = rx + " RX";
//      textBoxNetRx.Text  =  rx ;
//      textBoxNetTx.Text  =  tx ;
//    }
//
//    private string SelectNetCard()
//    {
//      NetDevice n = new NetDevice(ref PerfNet);
//      n.ShowDialog();
//      if(n.DialogResult == DialogResult.OK)
//      {
//        return n.comboBox1.Text;
//      }
//      return null;
//    }
//
//    private void button4_Click(object sender, System.EventArgs e)
//    {
//      if(!PerfNet.IsRunning)
//      {
//        NetPerfoResult p = new NetPerfoResult(NetPerfoResultCB);
//        PerfNet.SetPerfoCallback(p);
//        string Card = SelectNetCard();
//        if(Card != null)
//        {
//          PerfNet.NetDevice = Card;
//          PerfNet.Start();
//          button4.BackColor = Color.Red;
//          button4.Text = "STOP";
//        }
//      }
//      else
//      {
//        button4.Text = "START";
//        button4.BackColor = Color.PaleGreen;
//        PerfNet.Stop();
//        statusBar1.Panels[1].Text = "0";
//        statusBar1.Panels[2].Text = "0";
//        textBoxNetRx.Text  =  "0";
//        textBoxNetTx.Text  =  "0";
//      }
//    }
//    #endregion

//    #region Mini Terminal
//
//    private void MiniTermInit()
//    {
//      UpdateRxString pCB = new UpdateRxString(UpdateMiniTermRxWindow);
//      MiniT = new miniterminal(pCB);
//    
//    }
//    private void UpdateMiniTermRxWindow(string str)
//    {
//      textBoxRx.AppendText(str);
//    }
//
//
//    private void buttonComOpen_Click(object sender, System.EventArgs e)
//    {
//      if( buttonComOpen.Text.Equals("Close"))
//      {
//        MiniT.Close();
//        buttonComOpen.Text="Open";
//        textBoxTx.Enabled=false;
//        return;
//      }
//      MiniT.ComSettings.port     = comboBoxPort.Text;
//      MiniT.ComSettings.baudRate = int.Parse(comboBoxBaud.Text); 
//      if (!MiniT.Open())
//      {
//        MessageBox.Show("Port kann nicht geöffnet werden !", "Terminal", MessageBoxButtons.OK);
//      }
//      buttonComOpen.Text="Close";
//      textBoxTx.Enabled=true;
//    }
//
//    private void textBoxTx_TextChanged(object sender, System.EventArgs e)
//    {
//      string act = textBoxTx.Text;
//      string tmp = act.Substring(act.Length-1,1);
//
//      Encoding enc = Encoding.ASCII;
//      byte []  ch = new Byte[1];
//      ch  =  enc.GetBytes(tmp);
//
//      MiniT.SendByte(ch[0]);
//    }
//
//    private void checkBoxHex_CheckedChanged(object sender, System.EventArgs e)
//    {
//      MiniT.ShowRxHexValues = checkBoxHex.Checked; 
//    }
//
//    private void textBoxCR_TextChanged(object sender, System.EventArgs e)
//    {
//      if (textBoxCR.Text.Length > 2 || textBoxCR.Text == "")
//      {
//        textBoxCR.Text="";
//        return;
//      }
//      
//      try
//      {
//        // Convert hex string to unsigned integer
//        MiniT.SetCrHexValue = System.Convert.ToUInt32(textBoxCR.Text, 16);
//      }
//      catch (Exception exception) 
//      {
//        MiniT.SetCrHexValue=0xFFFF;
//        return;
//      }
//    }
//    #endregion

    #region misc
//    private void button3_Click(object sender, System.EventArgs e)
//    {
//      Form2 fEnv = new Form2();
//      string s="";
//      IDictionary d =  Environment.GetEnvironmentVariables();
//      foreach (DictionaryEntry de in d)
//      {
//        s += de.Key + " --- " + de.Value +"\r\n";
//      }
//      s +=  "Os Version "  + "   ---   " + Environment.OSVersion.ToString()  + "\r\n";
//      s +=  "CLR Version " + "   ---   " + Environment.Version.ToString()    + "\r\n";
//      s +=  "Res. Mem "    + "   ---   " + Environment.WorkingSet.ToString() + "\r\n";
//      
//      fEnv.WriteTextFeld(s);
//      fEnv.Show();
//    }

   

   
    /*
      private void button9_Click(object sender, System.EventArgs e)
      {
        monitor m = new monitor();

        textBoxTest.Lines = m.GetWmiOs();

        textBoxTest.Text += "--- CPU ---"         + "\r\n";
        textBoxTest.Text += m.DatCpu.Name         + "\r\n";
        textBoxTest.Text += m.DatCpu.Description  + "\r\n";;
        textBoxTest.Text += m.DatCpu.SpeedCurrent + "\r\n";;
        textBoxTest.Text += m.DatCpu.SpeedMax     + "\r\n";;

        textBoxTest.Text += "--- Manufactor ---"    + "\r\n";
        textBoxTest.Text += m.DatNetCard.Manufactor + "\r\n";
        textBoxTest.Text += m.DatNetCard.Type       + "\r\n";
        textBoxTest.Text += m.DatNetCard.MacAdress  + "\r\n";

        textBoxTest.Text += "--- OS ---"    + "\r\n";
        textBoxTest.Text += m.DatOs.Name    + "\r\n";
        textBoxTest.Text += m.DatOs.Version + "\r\n";
      }
      */
    #endregion

    #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.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(NuGenPathWatcherMainForm));
        this.timer1 = new System.Windows.Forms.Timer(this.components);
        this.label8 = new System.Windows.Forms.Label();
        this.comboBoxFwatchDrive = new Janus.Windows.EditControls.UIComboBox();
        this.listBoxFiles = new System.Windows.Forms.ListBox();
        this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
        this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog();
        this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
        this.uIButton1 = new Janus.Windows.EditControls.UIButton();
        this.uICheckBox1 = new Janus.Windows.EditControls.UICheckBox();
        this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog();
        this.uiTab1 = new Janus.Windows.UI.Tab.UITab();
        this.uiTabPage1 = new Janus.Windows.UI.Tab.UITabPage();
        this.uiCommandManager1 = new Janus.Windows.UI.CommandBars.UICommandManager(this.components);
        this.BottomRebar1 = new Janus.Windows.UI.CommandBars.UIRebar();
        this.uiCommandBar1 = new Janus.Windows.UI.CommandBars.UICommandBar();
        this.Command01 = new Janus.Windows.UI.CommandBars.UICommand("Command0");
        this.Command11 = new Janus.Windows.UI.CommandBars.UICommand("Command1");
        this.Command21 = new Janus.Windows.UI.CommandBars.UICommand("Command2");
        this.Command31 = new Janus.Windows.UI.CommandBars.UICommand("Command3");
        this.Command51 = new Janus.Windows.UI.CommandBars.UICommand("Command5");
        this.imageList1 = new System.Windows.Forms.ImageList(this.components);
        this.Command0 = new Janus.Windows.UI.CommandBars.UICommand("Command0");
        this.Command1 = new Janus.Windows.UI.CommandBars.UICommand("Command1");
        this.Command2 = new Janus.Windows.UI.CommandBars.UICommand("Command2");
        this.Command3 = new Janus.Windows.UI.CommandBars.UICommand("Command3");
        this.Command41 = new Janus.Windows.UI.CommandBars.UICommand("Command4");
        this.Command42 = new Janus.Windows.UI.CommandBars.UICommand("Command4");
        this.Command43 = new Janus.Windows.UI.CommandBars.UICommand("Command4");
        this.Command44 = new Janus.Windows.UI.CommandBars.UICommand("Command4");
        this.Command45 = new Janus.Windows.UI.CommandBars.UICommand("Command4");
        this.Command46 = new Janus.Windows.UI.CommandBars.UICommand("Command4");
        this.Command47 = new Janus.Windows.UI.CommandBars.UICommand("Command4");
        this.Command48 = new Janus.Windows.UI.CommandBars.UICommand("Command4");
        this.Command49 = new Janus.Windows.UI.CommandBars.UICommand("Command4");
        this.Command410 = new Janus.Windows.UI.CommandBars.UICommand("Command4");
        this.Command4 = new Janus.Windows.UI.CommandBars.UICommand("Command4");
        this.toolStripDropDownButton1 = new Janus.Windows.UI.CommandBars.UICommand("Command5");
        this.LeftRebar1 = new Janus.Windows.UI.CommandBars.UIRebar();
        this.RightRebar1 = new Janus.Windows.UI.CommandBars.UIRebar();
        this.TopRebar1 = new Janus.Windows.UI.CommandBars.UIRebar();
        ((System.ComponentModel.ISupportInitialize)(this.uiTab1)).BeginInit();
        this.uiTab1.SuspendLayout();
        this.uiTabPage1.SuspendLayout();
        ((System.ComponentModel.ISupportInitialize)(this.uiCommandManager1)).BeginInit();
        ((System.ComponentModel.ISupportInitialize)(this.BottomRebar1)).BeginInit();
        ((System.ComponentModel.ISupportInitialize)(this.uiCommandBar1)).BeginInit();
        ((System.ComponentModel.ISupportInitialize)(this.LeftRebar1)).BeginInit();
        ((System.ComponentModel.ISupportInitialize)(this.RightRebar1)).BeginInit();
        ((System.ComponentModel.ISupportInitialize)(this.TopRebar1)).BeginInit();
        this.TopRebar1.SuspendLayout();
        this.SuspendLayout();
        // 
        // timer1
        // 
        this.timer1.Enabled = true;
        this.timer1.Interval = 1000;
        // 
        // label8
        // 
        this.label8.BackColor = System.Drawing.Color.Transparent;
        this.label8.Location = new System.Drawing.Point(116, 5);
        this.label8.Name = "label8";
        this.label8.Size = new System.Drawing.Size(37, 21);
        this.label8.TabIndex = 6;
        this.label8.Text = "Path:";
        this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
        // 
        // comboBoxFwatchDrive
        // 
        this.comboBoxFwatchDrive.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                    | System.Windows.Forms.AnchorStyles.Right)));
        this.comboBoxFwatchDrive.BackColor = System.Drawing.Color.White;
        this.comboBoxFwatchDrive.Location = new System.Drawing.Point(159, 6);
        this.comboBoxFwatchDrive.Name = "comboBoxFwatchDrive";
        this.comboBoxFwatchDrive.Size = new System.Drawing.Size(210, 20);
        this.comboBoxFwatchDrive.TabIndex = 5;
        this.comboBoxFwatchDrive.Text = "C:\\";
        this.comboBoxFwatchDrive.Enter += new System.EventHandler(this.comboBoxFwatchDrive_Enter);
        this.comboBoxFwatchDrive.SelectedIndexChanged += new System.EventHandler(this.comboBoxFwatchDrive_SelectedIndexChanged);
        // 
        // listBoxFiles
        // 
        this.listBoxFiles.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                    | System.Windows.Forms.AnchorStyles.Left)
                    | System.Windows.Forms.AnchorStyles.Right)));
        this.listBoxFiles.BackColor = System.Drawing.Color.White;
        this.listBoxFiles.BorderStyle = System.Windows.Forms.BorderStyle.None;
        this.listBoxFiles.HorizontalScrollbar = true;
        this.listBoxFiles.Location = new System.Drawing.Point(11, 43);
        this.listBoxFiles.Name = "listBoxFiles";
        this.listBoxFiles.Size = new System.Drawing.Size(405, 234);
        this.listBoxFiles.TabIndex = 3;
        // 
        // saveFileDialog1
        // 
        this.saveFileDialog1.OverwritePrompt = false;
        this.saveFileDialog1.Title = "Choose a File ...";
        // 
        // uIButton1
        // 
        this.uIButton1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
        this.uIButton1.ButtonStyle = Janus.Windows.EditControls.ButtonStyle.Ellipsis;
        this.uIButton1.Location = new System.Drawing.Point(381, 5);
        this.uIButton1.Name = "uIButton1";
        this.uIButton1.Size = new System.Drawing.Size(41, 21);
        this.uIButton1.TabIndex = 11;
        this.uIButton1.UseThemes = false;
        this.uIButton1.VisualStyle = Janus.Windows.UI.VisualStyle.VS2005;
        this.uIButton1.Click += new System.EventHandler(this.uIButton1_Click_1);
        // 
        // uICheckBox1
        // 
        this.uICheckBox1.BackColor = System.Drawing.Color.Transparent;
        this.uICheckBox1.Location = new System.Drawing.Point(7, 6);
        this.uICheckBox1.Name = "uICheckBox1";
        this.uICheckBox1.Size = new System.Drawing.Size(103, 20);
        this.uICheckBox1.TabIndex = 10;
        this.uICheckBox1.Text = "Always On Top";
        this.uICheckBox1.UseThemes = false;
        this.uICheckBox1.VisualStyle = Janus.Windows.UI.VisualStyle.VS2005;
        this.uICheckBox1.CheckedChanged += new System.EventHandler(this.uICheckBox1_CheckedChanged);
        // 
        // uiTab1
        // 
        this.uiTab1.BackColor = System.Drawing.Color.Transparent;
        this.uiTab1.Dock = System.Windows.Forms.DockStyle.Fill;
        this.uiTab1.Location = new System.Drawing.Point(0, 28);
        this.uiTab1.Name = "uiTab1";
        this.uiTab1.ShowTabs = false;
        this.uiTab1.Size = new System.Drawing.Size(427, 296);
        this.uiTab1.TabDisplay = Janus.Windows.UI.Tab.TabDisplay.Text;
        this.uiTab1.TabIndex = 12;
        this.uiTab1.TabPages.AddRange(new Janus.Windows.UI.Tab.UITabPage[] {
            this.uiTabPage1});
        this.uiTab1.VisualStyle = Janus.Windows.UI.Tab.TabVisualStyle.Office2007;
        // 
        // uiTabPage1
        // 
        this.uiTabPage1.Controls.Add(this.listBoxFiles);
        this.uiTabPage1.Controls.Add(this.uIButton1);
        this.uiTabPage1.Controls.Add(this.uICheckBox1);
        this.uiTabPage1.Controls.Add(this.comboBoxFwatchDrive);
        this.uiTabPage1.Controls.Add(this.label8);
        this.uiTabPage1.Location = new System.Drawing.Point(1, 1);
        this.uiTabPage1.Name = "uiTabPage1";
        this.uiTabPage1.Size = new System.Drawing.Size(425, 294);
        this.uiTabPage1.TabStop = true;
        this.uiTabPage1.Text = "New Tab";
        // 
        // uiCommandManager1
        // 
        this.uiCommandManager1.BottomRebar = this.BottomRebar1;
        this.uiCommandManager1.CommandBars.AddRange(new Janus.Windows.UI.CommandBars.UICommandBar[] {
            this.uiCommandBar1});
        this.uiCommandManager1.Commands.AddRange(new Janus.Windows.UI.CommandBars.UICommand[] {
            this.Command0,
            this.Command1,
            this.Command2,
            this.Command3,
            this.Command4,
            this.toolStripDropDownButton1});
        this.uiCommandManager1.ContainerControl = this;
        this.uiCommandManager1.Id = new System.Guid("c2663708-0a3b-4d29-8fdd-f47b1751c5cd");
        this.uiCommandManager1.LeftRebar = this.LeftRebar1;
        this.uiCommandManager1.RightRebar = this.RightRebar1;
        this.uiCommandManager1.TopRebar = this.TopRebar1;
        this.uiCommandManager1.VisualStyle = Janus.Windows.UI.VisualStyle.Office2007;
        // 
        // BottomRebar1
        // 
        this.BottomRebar1.CommandManager = this.uiCommandManager1;
        this.BottomRebar1.Dock = System.Windows.Forms.DockStyle.Bottom;
        this.BottomRebar1.Location = new System.Drawing.Point(0, 324);
        this.BottomRebar1.Name = "BottomRebar1";
        this.BottomRebar1.Size = new System.Drawing.Size(427, 0);
        // 
        // uiCommandBar1
        // 
        this.uiCommandBar1.AllowClose = Janus.Windows.UI.InheritableBoolean.False;
        this.uiCommandBar1.AllowCustomize = Janus.Windows.UI.InheritableBoolean.False;
        this.uiCommandBar1.CommandManager = this.uiCommandManager1;
        this.uiCommandBar1.Commands.AddRange(new Janus.Windows.UI.CommandBars.UICommand[] {
            this.Command01,
            this.Command11,
            this.Command21,
            this.Command31,
            this.Command51});
        this.uiCommandBar1.FullRow = true;
        this.uiCommandBar1.ImageList = this.imageList1;
        this.uiCommandBar1.Key = "CommandBar1";
        this.uiCommandBar1.Location = new System.Drawing.Point(0, 0);
        this.uiCommandBar1.Name = "uiCommandBar1";
        this.uiCommandBar1.RowIndex = 0;
        this.uiCommandBar1.ShowAddRemoveButton = Janus.Windows.UI.InheritableBoolean.False;
        this.uiCommandBar1.ShowCustomizeButton = Janus.Windows.UI.InheritableBoolean.False;
        this.uiCommandBar1.ShowToolTips = Janus.Windows.UI.InheritableBoolean.False;
        this.uiCommandBar1.Size = new System.Drawing.Size(427, 28);
        this.uiCommandBar1.Text = "CommandBar1";
        this.uiCommandBar1.CommandClick += new Janus.Windows.UI.CommandBars.CommandEventHandler(this.uiCommandBar1_CommandClick);
        // 
        // Command01
        // 
        this.Command01.ImageIndex = 0;
        this.Command01.Key = "Command0";
        this.Command01.Name = "Command01";
        // 
        // Command11
        // 
        this.Command11.ImageIndex = 1;
        this.Command11.Key = "Command1";
        this.Command11.Name = "Command11";
        // 
        // Command21
        // 
        this.Command21.ImageIndex = 2;
        this.Command21.Key = "Command2";
        this.Command21.Name = "Command21";
        // 
        // Command31
        // 
        this.Command31.Key = "Command3";
        this.Command31.Name = "Command31";
        this.Command31.ShowTextInContainers = Janus.Windows.UI.InheritableBoolean.True;
        // 
        // Command51
        // 
        this.Command51.Key = "Command5";
        this.Command51.Name = "Command51";
        // 
        // imageList1
        // 
        this.imageList1.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
        this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
        this.imageList1.Images.SetKeyName(0, "NavigateForward.png");
        this.imageList1.Images.SetKeyName(1, "NoAccess.png");
        this.imageList1.Images.SetKeyName(2, "Delete.png");
        // 
        // Command0
        // 
        this.Command0.Key = "Command0";
        this.Command0.Name = "Command0";
        this.Command0.Text = "Start";
        // 
        // Command1
        // 
        this.Command1.Key = "Command1";
        this.Command1.Name = "Command1";
        this.Command1.Text = "Stop";
        // 
        // Command2
        // 
        this.Command2.Key = "Command2";
        this.Command2.Name = "Command2";
        this.Command2.Text = "Clear Files";
        // 
        // Command3
        // 
        this.Command3.Commands.AddRange(new Janus.Windows.UI.CommandBars.UICommand[] {
            this.Command41,
            this.Command42,
            this.Command43,
            this.Command44,
            this.Command45,
            this.Command46,
            this.Command47,
            this.Command48,
            this.Command49,
            this.Command410});
        this.Command3.IsEditableControl = Janus.Windows.UI.InheritableBoolean.True;
        this.Command3.Key = "Command3";
        this.Command3.Name = "Command3";
        this.Command3.Text = "Opacity";
        // 
        // Command41
        // 
        this.Command41.Key = "Command4";
        this.Command41.Name = "Command41";
        // 
        // Command42
        // 
        this.Command42.Key = "Command4";
        this.Command42.Name = "Command42";
        this.Command42.Text = "20%";
        // 
        // Command43
        // 
        this.Command43.Key = "Command4";
        this.Command43.Name = "Command43";
        this.Command43.Text = "30%";
        // 
        // Command44
        // 
        this.Command44.Key = "Command4";
        this.Command44.Name = "Command44";
        this.Command44.Text = "40%";
        // 
        // Command45
        // 
        this.Command45.Key = "Command4";
        this.Command45.Name = "Command45";
        this.Command45.Text = "50%";
        // 
        // Command46
        // 
        this.Command46.Key = "Command4";
        this.Command46.Name = "Command46";
        this.Command46.Text = "60%";
        // 
        // Command47
        // 
        this.Command47.Key = "Command4";
        this.Command47.Name = "Command47";
        this.Command47.Text = "70%";
        // 
        // Command48
        // 
        this.Command48.Key = "Command4";
        this.Command48.Name = "Command48";
        this.Command48.Text = "80%";
        // 
        // Command49
        // 
        this.Command49.Key = "Command4";
        this.Command49.Name = "Command49";
        this.Command49.Text = "90%";
        // 
        // Command410
        // 
        this.Command410.Key = "Command4";
        this.Command410.Name = "Command410";
        this.Command410.Text = "100%";
        // 
        // Command4
        // 
        this.Command4.Key = "Command4";
        this.Command4.Name = "Command4";
        this.Command4.Text = "10%";
        // 
        // toolStripDropDownButton1
        // 
        this.toolStripDropDownButton1.CommandType = Janus.Windows.UI.CommandBars.CommandType.Label;
        this.toolStripDropDownButton1.Enabled = Janus.Windows.UI.InheritableBoolean.False;
        this.toolStripDropDownButton1.Key = "Command5";
        this.toolStripDropDownButton1.Name = "toolStripDropDownButton1";
        this.toolStripDropDownButton1.Text = "Ready";
        // 
        // LeftRebar1
        // 
        this.LeftRebar1.CommandManager = this.uiCommandManager1;
        this.LeftRebar1.Dock = System.Windows.Forms.DockStyle.Left;
        this.LeftRebar1.Location = new System.Drawing.Point(0, 28);
        this.LeftRebar1.Name = "LeftRebar1";
        this.LeftRebar1.Size = new System.Drawing.Size(0, 296);
        // 
        // RightRebar1
        // 
        this.RightRebar1.CommandManager = this.uiCommandManager1;
        this.RightRebar1.Dock = System.Windows.Forms.DockStyle.Right;
        this.RightRebar1.Location = new System.Drawing.Point(427, 28);
        this.RightRebar1.Name = "RightRebar1";
        this.RightRebar1.Size = new System.Drawing.Size(0, 296);
        // 
        // TopRebar1
        // 
        this.TopRebar1.CommandBars.AddRange(new Janus.Windows.UI.CommandBars.UICommandBar[] {
            this.uiCommandBar1});
        this.TopRebar1.CommandManager = this.uiCommandManager1;
        this.TopRebar1.Controls.Add(this.uiCommandBar1);
        this.TopRebar1.Dock = System.Windows.Forms.DockStyle.Top;
        this.TopRebar1.Location = new System.Drawing.Point(0, 0);
        this.TopRebar1.Name = "TopRebar1";
        this.TopRebar1.Size = new System.Drawing.Size(427, 28);
        // 
        // NuGenPathWatcherMainForm
        // 
        this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
        this.ClientSize = new System.Drawing.Size(427, 324);
        this.Controls.Add(this.uiTab1);
        this.Controls.Add(this.TopRebar1);
        this.Cursor = System.Windows.Forms.Cursors.Default;
        this.DoubleBuffered = true;
        this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
        this.MaximizeBox = false;
        this.Name = "NuGenPathWatcherMainForm";
        this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
        this.Text = "Path Watcher";
        this.Load += new System.EventHandler(this.Form1_Load);
        ((System.ComponentModel.ISupportInitialize)(this.uiTab1)).EndInit();
        this.uiTab1.ResumeLayout(false);
        this.uiTabPage1.ResumeLayout(false);
        ((System.ComponentModel.ISupportInitialize)(this.uiCommandManager1)).EndInit();
        ((System.ComponentModel.ISupportInitialize)(this.BottomRebar1)).EndInit();
        ((System.ComponentModel.ISupportInitialize)(this.uiCommandBar1)).EndInit();
        ((System.ComponentModel.ISupportInitialize)(this.LeftRebar1)).EndInit();
        ((System.ComponentModel.ISupportInitialize)(this.RightRebar1)).EndInit();
        ((System.ComponentModel.ISupportInitialize)(this.TopRebar1)).EndInit();
        this.TopRebar1.ResumeLayout(false);
        this.ResumeLayout(false);

	}
Пример #4
0
        private void uiCommandManager1_CommandClick(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
        {
            try
            {
                Janus.Windows.UI.CommandBars.UICommandBar bar = uiCommandManager1.CommandBars[0];
                if (bar.Commands.Contains(e.Command.Key) && bar.Commands[e.Command.Key].Commands.Count > 0)
                {
                    bar.Commands[e.Command.Key].Expand();
                }

                switch (e.Command.Key)
                {
                case "cmdChangeCode":
                    if (MessageBox.Show("Do you want to update all occurences of this template code?  Make sure you have saved any workflow changes first.", "TEMPLATES", MessageBoxButtons.OKCancel) == System.Windows.Forms.DialogResult.OK)
                    {
                        AtMng.GetTemplate().ChangeTemplateCode(ebBaseTemplate.Text, editBox1.Text);
                    }
                    break;

                case "cmdSelectAllFlaggedDocs":
                    SelectAllFlaggedTemplatesForExport();
                    break;

                case "cmdCancel":
                    Cancel();
                    break;

                case "cmdDelete":
                    Delete();
                    break;

                case "cmdNewRTFTemplate":
                    New("RTF");
                    break;

                case "cmdNewHTMLTemplate":
                    New("HTML");
                    break;

                case "cmdNewTextTemplate":
                    New("TXT");
                    break;

                case "cmdSave":
                    Save();
                    break;

                case "cmdExport":
                    Export();
                    break;

                case "cmdImport":
                    Import();
                    break;

                case "cmdClone":
                    Clone();
                    break;

                case "cmdClearSelectedDocs":
                    ClearSelectedDocs();
                    break;

                case "cmdPreviewDoc":
                    ToggleDocPreview(cmdPreviewDoc.IsChecked);
                    break;
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Пример #5
0
        private void uiCommandManager1_CommandClick(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
        {
            try
            {
                Janus.Windows.UI.CommandBars.UICommandBar bar = uiCommandManager1.CommandBars[1];
                if (bar.Commands.Contains(e.Command.Key) && bar.Commands[e.Command.Key].Commands.Count > 0)
                {
                    bar.Commands[e.Command.Key].Expand();
                }

                switch (e.Command.Key)
                {
                case "cmdSetLayout":
                    lmWinHelper.LoadGridLayout(timeSlipGridEX, "TimeslipGridExUser", LayoutVersionNumber);
                    sRPGridEX.MoveFirst();
                    TimeslipReadOnly(!CurrentRowSRP().IsSRPSubmittedDateNull());
                    ToggleGridGroups();
                    if (timeSlipGridEX.FilterMode == Janus.Windows.GridEX.FilterMode.None)
                    {
                        cmdFilter.IsChecked = false;
                    }
                    else
                    {
                        cmdFilter.IsChecked = true;
                    }
                    break;

                case "cmdResetGridToAppLayout":
                    if (gridLayoutStream != null)
                    {
                        gridLayoutStream.Position = 0;
                        ClearData();
                        BindTimeSlipData(FM.DB.SRP);
                        timeSlipGridEX.LoadLayoutFile(gridLayoutStream);
                        UIHelper.ComboBoxInit("vOfficerList", timeSlipGridEX.DropDowns["ddOfficer"], FM);
                        cmdFilter.IsChecked = false;
                        timeSlipGridEX.Refetch();
                        sRPGridEX.MoveFirst();
                        TimeslipReadOnly(!CurrentRowSRP().IsSRPSubmittedDateNull());
                        ToggleGridGroups();
                    }
                    break;

                case "cmdStoreLayout":
                    lmWinHelper.UpdateLayout(timeSlipGridEX);
                    lmWinHelper.SaveGridLayout(timeSlipGridEX, "TimeslipGridExUser", FM.AtMng, LayoutVersionNumber);
                    break;

                case "cmdCloseTimeSlip":
                    if (MessageBox.Show(LawMate.Properties.Resources.AreYouSureYouWantToCloseTimekeeping, LawMate.Properties.Resources.TimekeepingPeriodClosure, MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
                    {
                        int selectedSRPid = CurrentRowSRP().SRPID;
                        FM.GetSRP().CloseActivityTimePeriod(CurrentRowSRP().SRPID);
                        foreach (appDB.TimeSlipRow tsdr in TSdt.Select("SRPID is null and StartTime >= '" + CurrentRowSRP().SRPDate + "' and StartTime <= '" + CurrentRowSRP().SRPDate.AddMonths(1).AddMinutes(-1) + "'", "FileId"))
                        {
                            if (!FileIDsInSRP.Contains(tsdr.FileId))
                            {
                                FileIDsInSRP.Add(tsdr.FileId);
                            }
                        }
                        ((fFile)ParentForm).MainForm.PostSubmitTimekeepingReloadActivityTime(FileIDsInSRP);
                        ReloadUserControlData();
                        ((fFile)ParentForm).GetUcCtlToc("timeslip", "SRP", selectedSRPid);
                        //sRPBindingSource.Position = sRPBindingSource.Find("SRPID", selectedSRPid);
                    }
                    break;

                case "cmdFilter":
                    if (e.Command.IsChecked)
                    {
                        timeSlipGridEX.FilterMode = Janus.Windows.GridEX.FilterMode.Automatic;
                    }
                    else
                    {
                        timeSlipGridEX.FilterMode = Janus.Windows.GridEX.FilterMode.None;
                    }
                    break;

                case "cmdFieldChooser":
                    timeSlipGridEX.ShowFieldChooser(this.ParentForm, LawMate.Properties.Resources.FieldSelector);
                    break;

                case "cmdRefresh":
                    //int currentSRP = CurrentRowSRP().SRPID;
                    ReloadUserControlData();
                    //((fFile)ParentForm).GetUcCtlToc("timeslip", "SRP", currentSRP);
                    break;
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Пример #6
0
        private void uiCommandManager1_CommandClick(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
        {
            try
            {
                Janus.Windows.UI.CommandBars.UICommandBar bar = uiCommandManager1.CommandBars["cbMergeToolbar"];
                if (bar.Commands.Contains(e.Command.Key) && bar.Commands[e.Command.Key].Commands.Count > 0)
                {
                    bar.Commands[e.Command.Key].Expand();
                }

                switch (e.Command.Key)
                {
                case "cmdLinkOpinion":
                    HookupNewOpinionDoc(true);
                    break;

                case "cmdLinkRequest":
                    HookupNewOpinionDoc(false);
                    break;

                case "tsSave":
                    Save();
                    break;

                case "tsShowOpinion":
                    if (e.Command.IsChecked)
                    {
                        DisplayDoc(dvOpinion);
                        tsShowRequest.IsChecked = false;
                    }
                    else
                    {
                        tsShowOpinion.IsChecked = true;
                    }
                    break;

                case "tsShowRequest":
                    if (e.Command.IsChecked)
                    {
                        DisplayDoc(dvRequest);
                        tsShowOpinion.IsChecked = false;
                    }
                    else
                    {
                        tsShowRequest.IsChecked = true;
                    }
                    break;

                case "tsDelete":
                    Delete();
                    break;

                case "tsAudit":
                    fData fAudit = new fData(CurrentRow());
                    fAudit.Show();
                    break;
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Пример #7
0
        private void uiCommandManager1_CommandClick(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
        {
            try
            {
                Janus.Windows.UI.CommandBars.UICommandBar bar = uiCommandManager1.CommandBars["cbMergeToolbar"];
                if (bar.Commands.Contains(e.Command.Key) && bar.Commands[e.Command.Key].Commands.Count > 0)
                {
                    bar.Commands[e.Command.Key].Expand();
                }

                switch (e.Command.Key)
                {
                case "tsProcessFirst":
                    ProcessCashBlotter();
                    break;

                case "tsProcessSecond":
                    ProcessCashBlotter();
                    break;

                case "tsSave":
                    Save();
                    break;

                case "tsDelete":
                    Delete();
                    break;

                case "cmdGoToActivity":
                    FileForm().MainForm.OpenFile(CurrentDetailRow().FileID);
                    break;

                case "cmdGoToCB":
                    fFile f1 = FileForm().MainForm.OpenFile(CurrentDetailRow().FileID);
                    f1.MoreInfo("cbdetail", CurrentDetailRow().CashBlotterDetailID);
                    break;

                case "cmdGoToGeneralFile":
                    FileForm().MainForm.OpenFile(CurrentDetailRow().FileID);
                    break;

                case "tsAudit":
                    fData fAudit = new fData(CurrentRow());
                    fAudit.Show();
                    break;

                case "tsPrintCB":
                    ActivityConfig.ACSeriesRow acsr;
                    if (CurrentRow().IsRemittedDateNull())
                    {
                        acsr = FM.AtMng.acMng.DB.ACSeries.FindByACSeriesId(UIHelper.AtMng.GetSetting(atriumBE.AppIntSetting.CBPrintDraftAcId));
                    }
                    else
                    {
                        acsr = FM.AtMng.acMng.DB.ACSeries.FindByACSeriesId(UIHelper.AtMng.GetSetting(atriumBE.AppIntSetting.CBPrintCopyAcId));
                    }

                    this.FileForm().ReadOnly = true;
                    fACWizard facwr = new fACWizard(FM, acsr.ACSeriesId, atriumBE.ACEngine.RevType.CashBlotter, CurrentRow().CashBlotterID, null);
                    this.FileForm().HookupWizClose(facwr);
                    facwr.Show();

                    break;
                }
                FileForm().HandleACSMenu(e, CurrentRow());
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Пример #8
0
        private void uiCommandManager1_CommandClick(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
        {
            try
            {
                Janus.Windows.UI.CommandBars.UICommandBar bar = uiCommandManager1.CommandBars[0];
                if (bar.Commands.Contains(e.Command.Key) && bar.Commands[e.Command.Key].Commands.Count > 0)
                {
                    bar.Commands[e.Command.Key].Expand();
                }

                switch (e.Command.Key)
                {
                case "cmdShowFN":
                    if (cmdShowFN.Checked == Janus.Windows.UI.InheritableBoolean.True)
                    {
                        this.ShowFileNumber = true;
                    }
                    else
                    {
                        this.ShowFileNumber = false;
                    }

                    UIHelper.AtMng.OfficeMng.GetOfficerPrefs().SetPref(OfficerPrefsBE.FTVShowFileNumber, ShowFileNumber);
                    break;

                case "cmdShowOpenFiles":
                    if (cmdShowOpenFiles.Checked == Janus.Windows.UI.InheritableBoolean.True)
                    {
                        this.ShowOnlyOpenFiles = true;
                    }
                    else
                    {
                        this.ShowOnlyOpenFiles = false;
                    }

                    UIHelper.AtMng.OfficeMng.GetOfficerPrefs().SetPref(OfficerPrefsBE.FTVShowOpenFiles, ShowOnlyOpenFiles);
                    break;

                case "cmdHideXRef":
                    if (cmdHideXRef.Checked == Janus.Windows.UI.InheritableBoolean.True)
                    {
                        this.HideXrefs = true;
                    }
                    else
                    {
                        this.HideXrefs = false;
                    }

                    UIHelper.AtMng.OfficeMng.GetOfficerPrefs().SetPref(OfficerPrefsBE.FTVShowXrefs, HideXrefs);
                    break;

                case "cmdReset":
                    ReloadRoot();
                    break;

                case "cmdJumpOffice":
                    FindFile(myFTV.myAtmng.OfficeLoggedOn.OfficeFileId);
                    break;

                case "cmdJumpPersonal":
                    FindFile(myFTV.myAtmng.OfficerLoggedOn.MyFileId);
                    break;

                case "cmdJumpShortcuts":
                    FindFile(myFTV.myAtmng.OfficerLoggedOn.ShortcutsId);
                    break;

                default:
                    break;
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Пример #9
0
        private void uiCommandManager1_CommandClick(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
        {
            try
            {
                Janus.Windows.UI.CommandBars.UICommandBar bar = uiCommandManager1.CommandBars["cbMergeToolbar"];
                if (bar.Commands.Contains(e.Command.Key) && bar.Commands[e.Command.Key].Commands.Count > 0)
                {
                    bar.Commands[e.Command.Key].Expand();
                }

                switch (e.Command.Key)
                {
                case "tsImportBulk":
                    int docId = UploadFile();
                    if (docId != 0)
                    {
                        FM.AtMng.GetBatch().SubmitJob("ImportDisb", CurrentRow().FileID.ToString() + "," + CurrentRow().SRPID.ToString() + "," + docId.ToString() + ",Bulk");
                    }
                    break;

                case "tsImportAll":
                    int docId1 = UploadFile();
                    if (docId1 != 0)
                    {
                        FM.AtMng.GetBatch().SubmitJob("ImportDisb", CurrentRow().FileID.ToString() + "," + CurrentRow().SRPID.ToString() + "," + docId1.ToString() + ",All");
                    }
                    break;

                case "tsExportFees":
                    Export("Fees");
                    break;

                case "tsExportDisb":
                    Export("Disb");
                    break;

                case "cmdSave":
                    Save();
                    break;

                case "cmdDelete":
                    Delete();
                    break;

                case "cmdNew":
                    atriumDB.SRPRow newSrp = (atriumDB.SRPRow)FM.GetSRP().Add(FM.CurrentFile);
                    sRPBindingSource.Position = sRPBindingSource.Find("SRPID", newSrp.SRPID);
                    ApplySecurity(newSrp);
                    break;

                case "tsGenSRP":
                    //TODO why is this load office manager here?!
                    if (MessageBox.Show("You are about to generate your SRP. This operation might take a few seconds.\n\nAre you sure you want to perform this operation?", "Generate SRP", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
                    {
                        Application.UseWaitCursor = true;
                        Application.DoEvents();
                        FM.GetSRP().LoadOfficeManager(CurrentRow().SRPID);
                        FM.GetSRP().GenSrp(CurrentRow().SRPID);
                        FileForm().ReloadFileData();
                        Application.UseWaitCursor = false;
                        MessageBox.Show("Your SRP was successfully generated.");
                    }
                    //MessageBox.Show(LawMate.Properties.Resources.UIGenerateSRP, LawMate.Properties.Resources.UIGenerateSRPCaption);
                    break;

                case "tsSubmitSRP":
                    if (MessageBox.Show("-------------------------\n------SUBMIT SRP------\n-------------------------\n\nYou are about to submit your SRP. This operation might take a few seconds.\n\nAre you sure you want to submit your SRP?", "Submit SRP", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
                    {
                        Application.UseWaitCursor = true;
                        Application.DoEvents();
                        FM.GetSRP().LoadOfficeManager(CurrentRow().SRPID);
                        FM.GetSRP().GenSrp(CurrentRow().SRPID);
                        FM.GetSRP().SubmitSrp(CurrentRow().SRPID);
                        FileForm().ReloadFileData();
                        MessageBox.Show("Your SRP was successfully submitted.");
                        Application.UseWaitCursor = false;
                    }
                    break;

                case "cmdRollbackSRP":
                    if (MessageBox.Show("This will undo the submitting of this SRP.\n\nAre you sure you want to perform this operation?", "Undo Submit of SRP", MessageBoxButtons.YesNo, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button2) == DialogResult.Yes)
                    {
                        Application.UseWaitCursor = true;
                        Application.DoEvents();
                        FM.GetSRP().RollbackSRP(CurrentRow());
                        FileForm().ReloadFileData();
                        MessageBox.Show("The selected SRP was successfully rolled back.");
                        Application.UseWaitCursor = false;
                    }

                    MessageBox.Show("The selected SRP was rolled back.");
                    break;

                case "tsGoToSRPDetail":
                    FileForm().MoreInfo("srpdetail", CurrentRow().SRPID);
                    break;

                case "tsGoToBillingReview":
                    FileForm().MoreInfo("billingreview", CurrentRow().SRPID);
                    break;
                }
                FileForm().HandleACSMenu(e, CurrentRow());
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }
Пример #10
0
        private void uiCommandManager1_CommandClick(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
        {
            try
            {
                Janus.Windows.UI.CommandBars.UICommandBar bar = uiCommandManager1.CommandBars["cbMergeToolbar"];
                if (bar.Commands.Contains(e.Command.Key) && bar.Commands[e.Command.Key].Commands.Count > 0)
                {
                    bar.Commands[e.Command.Key].Expand();
                }


                switch (e.Command.Key)
                {
                case "cmdFieldSelector":
                    ucRecordList1.RecordsGridEx.ShowFieldChooser(this.ParentForm, LawMate.Properties.Resources.FieldSelector);
                    break;

                case "tsFilter":
                    if (e.Command.IsChecked)
                    {
                        ucRecordList1.RecordsGridEx.FilterMode = Janus.Windows.GridEX.FilterMode.Automatic;
                    }
                    else
                    {
                        ucRecordList1.RecordsGridEx.FilterMode = Janus.Windows.GridEX.FilterMode.None;
                    }
                    break;

                case "tsGroupBy":
                    if (e.Command.IsChecked)
                    {
                        ucRecordList1.RecordsGridEx.GroupByBoxVisible = true;
                    }
                    else
                    {
                        ucRecordList1.RecordsGridEx.RootTable.Groups.Clear();
                        ucRecordList1.RecordsGridEx.GroupByBoxVisible = false;
                    }
                    break;

                case "cmdClone":
                    myDM.GetDocument().MakeCopy(CurrentRow(), FM.CurrentFile, true);
                    break;

                case "tsTemplate":
                    FileForm().GetUcCtlToc("template");

                    break;

                case "cmdRevise":
                    lmWinHelper.ReviseDocument(FM, CurrentRow().DocId);
                    break;

                case "tsPrint":
                    //ucDocPreview1.Print();
                    ucDocView1.Print();
                    break;

                case "tsPrintPreview":
                    //ucDocPreview1.PrintPreview();
                    ucDocView1.PrintPreview();
                    break;

                case "tsAdd":
                    //new activity
                    NewDoc(FM.AtMng.GetSetting(AppIntSetting.NewDocAcId));
                    break;

                case "tsAddRec":
                    //new activity
                    NewDoc(FM.AtMng.GetSetting(AppIntSetting.NewRecordAcId));
                    break;

                case "tsSend":
                    docDB.DocumentRow drc = CurrentRow();
                    if (drc.IsDraft)
                    {
                        drc = FM.GetDocMng().GetDocument().MakeCopy(CurrentRow(), FM.CurrentFile, false);
                    }

                    lmWinHelper.NewMail(FM, drc.DocId);
                    break;

                case "tsCopy":
                    StartCopy();

                    break;

                case "tsExport":
                    myDM.AtMng.Export("f.openeddate>'2011-1-1'");
                    break;

                case "tsCheckout":
                    CheckOut();
                    break;

                case "tsCheckin":

                    CheckIn();

                    break;

                case "tsUndoCheckout":
                    docDB.DocumentRow dr = (docDB.DocumentRow)((DataRowView)documentBindingSource.Current).Row;
                    ucDocView1.Clear();
                    //ucDocPreview1.Clear();
                    myDM.GetDocument().UndoCheckout(dr);
                    CheckoutToggle(dr);
                    ucDocView1.Preview();
                    //ucDocPreview1.Preview();
                    break;

                case "tsPreviewPane":
                    HidePreviewPane(tsPreviewPane.IsChecked);
                    break;

                case "tsSave":
                    Save();
                    break;

                case "tsAudit":
                    fData fAudit = new fData(CurrentRow());
                    fAudit.Show();
                    break;

                case "cmdJumpToActivity":
                    if (e.Command.Tag != null)
                    {
                        FileForm().MoreInfo("activity", (int)e.Command.Tag);
                    }
                    break;
                }

                if (e.Command.Key.StartsWith("cmdActivityMoreInfo"))
                {
                    FileForm().MoreInfo("activity", (int)e.Command.Tag);
                }
            }
            catch (Exception x)
            {
                UIHelper.HandleUIException(x);
            }
        }