Exemple #1
0
        //private void CreateUIDockableWindow(Dictionary<string, NBGIS.PluginEngine.IDockableWindowDef> DockableWindows)
        //{
        //    foreach (KeyValuePair<string, NBGIS.PluginEngine.IDockableWindowDef> dockWindowsItem in DockableWindows)
        //    {
        //        NBGIS.PluginEngine.IDockableWindowDef nbDockWindowItem = dockWindowsItem.Value;

        //        nbDockWindowItem.OnCreate(this.m_Application);

        //        Janus.Windows.UI.Dock.UIPanel panel = new Janus.Windows.UI.Dock.UIPanel();

        //        panel.FloatingLocation = new System.Drawing.Point(120, 180);
        //        panel.FloatingSize = new System.Drawing.Size(188, 188);
        //        panel.Name = nbDockWindowItem.Name;
        //        panel.Text = nbDockWindowItem.Caption;

        //        panel.DockState = Janus.Windows.UI.Dock.PanelDockState.Floating;

        //        ((System.ComponentModel.ISupportInitialize)(panel)).BeginInit();
        //        panel.SuspendLayout();
        //        panel.Id = Guid.NewGuid();
        //        this.uiPanelManager.Panels.Add(panel);

        //        Janus.Windows.UI.Dock.UIPanelInnerContainer panelContainer = new Janus.Windows.UI.Dock.UIPanelInnerContainer();
        //        panel.InnerContainer = panelContainer;


        //        try
        //        {
        //            //这个地方易发生异常,插件必须保证ChildHWND完全正确
        //            panelContainer.Controls.Add(nbDockWindowItem.ChildHWND);
        //            panelContainer.Location = new System.Drawing.Point(1, 27);
        //            panelContainer.Name = nbDockWindowItem.Name + "Container";
        //            panelContainer.Size = new System.Drawing.Size(188, 188);
        //            panelContainer.TabIndex = 0;

        //        }
        //        catch (Exception ex)
        //        {
        //            if (Applog.log.IsErrorEnabled)
        //            {
        //                Applog.log.Error("浮动窗体插件的子控件没有正确加载:" + ex.Message);
        //            }
        //        }
        //    }
        //}

        #endregion

        #region ITool与ICommand的Click事件方法
        private void uiCmd_Click(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
        {
            //当Command被按下时,CurrentTool设置为Null
            this.m_Application.CurrentTool                   = null;
            this.m_Application.MapControl.CurrentTool        = null;
            this.m_Application.PageLayoutControl.CurrentTool = null;
            //一切在Command被 按下前未完成的Tool操作都可能使Tool的Checked为True
            //此项必须设置为False
            foreach (Janus.Windows.UI.CommandBars.UICommand uiCmd in this.uiCommandManager.Commands)
            {
                uiCmd.Checked = Janus.Windows.UI.InheritableBoolean.False;
            }



            Janus.Windows.UI.CommandBars.UICommand cmd = (Janus.Windows.UI.CommandBars.UICommand)sender;
            cmd.Checked = Janus.Windows.UI.InheritableBoolean.True;
            this.axMapControl.MousePointer = ESRI.ArcGIS.Controls.esriControlsMousePointer.esriPointerDefault;

            NBGIS.PluginEngine.ICommand nbCmd = this.m_CommandCol[e.Command.Key];

            //状态栏显示插件信息
            this.StatusBar.Panels[0].Text = nbCmd.Message;
            nbCmd.OnClick();

            cmd.Checked = Janus.Windows.UI.InheritableBoolean.False;
        }
Exemple #2
0
        private void uiTool_Click(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
        {
            NBGIS.PluginEngine.ITool tool = this.m_ToolCol[e.Command.Key];
            //Tool第一次按下
            if (this.m_Application.CurrentTool == null &&
                this.m_MapControl.CurrentTool == null &&
                this.m_PageLayoutControl.CurrentTool == null)
            {
                this.StatusBar.Panels[0].Text = tool.Message;
                Janus.Windows.UI.CommandBars.UICommand cmd = (Janus.Windows.UI.CommandBars.UICommand)sender;
                cmd.Checked = Janus.Windows.UI.InheritableBoolean.True;
                this.axMapControl.MousePointer        = (ESRI.ArcGIS.Controls.esriControlsMousePointer)(tool.Cursor);
                this.axPageLayoutControl.MousePointer = (ESRI.ArcGIS.Controls.esriControlsMousePointer)(tool.Cursor);
                tool.OnClick();
                this.m_Application.CurrentTool = tool.ToString();
            }
            else
            {
                if (this.m_Application.CurrentTool == e.Command.Key)
                {
                    //如果是连续第二次按下,则这个Tool完成操作后处于关闭状态
                    Janus.Windows.UI.CommandBars.UICommand cmd = (Janus.Windows.UI.CommandBars.UICommand)sender;
                    cmd.Checked = Janus.Windows.UI.InheritableBoolean.False;
                    this.axMapControl.MousePointer                   = ESRI.ArcGIS.Controls.esriControlsMousePointer.esriPointerDefault;
                    this.axPageLayoutControl.MousePointer            = ESRI.ArcGIS.Controls.esriControlsMousePointer.esriPointerDefault;
                    this.m_Application.CurrentTool                   = null;
                    this.m_Application.MapControl.CurrentTool        = null;
                    this.m_Application.PageLayoutControl.CurrentTool = null;
                }
                else
                {
                    //按下一个Tool后没有关闭接着按另一个Tool,则关闭前一个Tool
                    Janus.Windows.UI.CommandBars.UICommand lastTool
                        = this.uiCommandManager.Commands[this.m_Application.CurrentTool];
                    if (lastTool != null)
                    {
                        lastTool.Checked = Janus.Windows.UI.InheritableBoolean.False;
                    }
                    this.m_Application.MapControl.CurrentTool        = null;
                    this.m_Application.PageLayoutControl.CurrentTool = null;

                    //设置后一个Tool的状态
                    this.StatusBar.Panels[0].Text = tool.Message;
                    Janus.Windows.UI.CommandBars.UICommand cmd = (Janus.Windows.UI.CommandBars.UICommand)sender;
                    cmd.Checked = Janus.Windows.UI.InheritableBoolean.True;
                    this.axMapControl.MousePointer        = (ESRI.ArcGIS.Controls.esriControlsMousePointer)(tool.Cursor);
                    this.axPageLayoutControl.MousePointer = (ESRI.ArcGIS.Controls.esriControlsMousePointer)(tool.Cursor);
                    tool.OnClick();
                    this.m_Application.CurrentTool = tool.ToString();
                }
            }
        }
Exemple #3
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);
                    }
                }
            }
        }
Exemple #4
0
        private void TaxRecDropDown(int irpId)
        {
            uiContextMenu2.Commands.Clear();

            if (!CurrentRowIRP().IsFileIDNull())
            {
                //CLAS.TaxingRow[] trs = (CLAS.TaxingRow[])FM.GetCLASMng().DB.Taxing.Select("IRPId=" + irpId, "TaxingDate");
                CLAS.TaxingRow[] trs = (CLAS.TaxingRow[])FM.GetCLASMng().DB.Taxing.Select("fileid=" + CurrentRowIRP().FileID.ToString(), "TaxingDate");
                foreach (CLAS.TaxingRow tr in trs)
                {
                    uiButton2.Enabled = true;
                    Janus.Windows.UI.CommandBars.UICommand newCmd;
                    string key = "cmdTaxRec" + tr.TaxingID;
                    if (uiContextMenu2.CommandManager.Commands.Contains(key))
                    {
                        newCmd = uiContextMenu2.CommandManager.Commands[key];
                    }
                    else
                    {
                        newCmd     = new Janus.Windows.UI.CommandBars.UICommand();
                        newCmd.Key = key;
                    }

                    string cmdText = "Date: " + tr.TaxingDate.ToString("yyyy/MM/dd");

                    if (!tr.IsTaxDownDisbNull() && tr.TaxDownDisb > 0)
                    {
                        cmdText += "; Amount: " + tr.TaxDownDisb.ToString("C");
                    }

                    if (!tr.IsTaxDownHoursNull() && tr.TaxDownHours > 0)
                    {
                        cmdText += "; Fees (Time): " + tr.TaxDownHours.ToString();
                    }

                    newCmd.Text = cmdText;
                    newCmd.Tag  = tr;
                    newCmd.ShowInCustomizeDialog = false;
                    uiContextMenu2.Commands.Add(newCmd);
                }
            }

            if (uiContextMenu2.Commands.Count == 0)
            {
                uiButton2.Enabled = false;
            }
        }
Exemple #5
0
        private void TaxRecDropDown(CLAS.TaxingRow[] trs)
        {
            uiContextMenu2.Commands.Clear();

            if (trs.Length == 0)
            {
                btnTaxRecs.Visible = false;
                return;
            }

            btnTaxRecs.Visible = true;
            btnTaxRecs.Text    = "Associated Taxing Recommendations (" + trs.Length + ")";

            foreach (CLAS.TaxingRow tr in trs)
            {
                Janus.Windows.UI.CommandBars.UICommand newCmd;
                string key = "cmdTaxRec" + tr.TaxingID;
                if (uiContextMenu2.CommandManager.Commands.Contains(key))
                {
                    newCmd = uiContextMenu2.CommandManager.Commands[key];
                }
                else
                {
                    newCmd     = new Janus.Windows.UI.CommandBars.UICommand();
                    newCmd.Key = key;
                }

                string cmdText = "Date: " + tr.TaxingDate.ToString("yyyy/MM/dd");

                if (!tr.IsTaxDownDisbNull() && tr.TaxDownDisb > 0)
                {
                    cmdText += "; Disb. Amount: " + tr.TaxDownDisb.ToString("C");
                }

                if (!tr.IsTaxDownHoursNull() && tr.TaxDownHours > 0)
                {
                    cmdText += "; Time : " + tr.TaxDownHours.ToString() + " hours";
                }

                newCmd.Text   = cmdText;
                newCmd.Tag    = tr;
                newCmd.Click += new Janus.Windows.UI.CommandBars.CommandEventHandler(newCmd_Click);
                newCmd.ShowInCustomizeDialog = false;
                uiContextMenu2.Commands.Add(newCmd);
            }
        }
Exemple #6
0
        private void CreateUIMenus(Dictionary <string, NBGIS.PluginEngine.IMenuDef> Menus)
        {
            foreach (KeyValuePair <string, NBGIS.PluginEngine.IMenuDef> menu in Menus)
            {
                NBGIS.PluginEngine.IMenuDef nbMenu = menu.Value;

                Janus.Windows.UI.CommandBars.UICommand uiMenu = new Janus.Windows.UI.CommandBars.UICommand();


                this.uiMainMenu.Commands.Add(uiMenu);

                uiMenu.Text    = nbMenu.Caption;
                uiMenu.Name    = nbMenu.Name;
                uiMenu.Tag     = nbMenu;
                uiMenu.Key     = nbMenu.ToString();
                uiMenu.Visible = nbMenu.IsVisible;

                //将Command和Tool插入到menu中
                //遍历每一个菜单item
                NBGIS.PluginEngine.IItemDef itemDef = new NBGIS.PluginEngine.ItemDef();
                for (int i = 0; i < nbMenu.ItemCount; i++)
                {
                    //寻找该菜单对象的信息,如该菜单上所有的Item数量,是否为Group
                    nbMenu.GetItemInfo(i, itemDef);
                    Janus.Windows.UI.CommandBars.UICommand uiCmd = null;
                    try
                    {
                        uiCmd = this.uiCommandManager.Commands[i];
                    }
                    catch (Exception ex)
                    {}
                    //如果该uiCommand存在,则添加
                    if (uiCmd != null)
                    {
                        //暂时不考虑Subtype的情况
                        if (itemDef.Group)
                        {
                            uiMenu.Commands.AddSeparator();
                        }
                        uiMenu.Commands.Add(uiCmd);
                    }
                }
            }
        }
Exemple #7
0
        private void CreateUICommandAndTool(Dictionary <string, NBGIS.PluginEngine.ICommand> Cmds, Dictionary <string, NBGIS.PluginEngine.ITool> Tools)
        {
            //遍历ICommand对象集合
            foreach (KeyValuePair <string, NBGIS.PluginEngine.ICommand> cmd in Cmds)
            {
                //获得一个ICommand对象
                NBGIS.PluginEngine.ICommand nbCmd = cmd.Value;

                //产生一个UICommand对象
                Janus.Windows.UI.CommandBars.UICommand uiCmd = new Janus.Windows.UI.CommandBars.UICommand();

                //根据ICommand的信息设置UICommand的属性
                uiCmd.ToolTipText  = nbCmd.Tooltip;
                uiCmd.CategoryName = nbCmd.Category;
                uiCmd.Text         = nbCmd.Caption;
                uiCmd.Image        = nbCmd.Bitmap;
                uiCmd.Key          = nbCmd.ToString();

                //UICommand的Enabled属性默认为true
                if (!nbCmd.Enabled)
                {
                    uiCmd.Enabled = Janus.Windows.UI.InheritableBoolean.False;
                }

                //UICommand的Checked属性默认为false
                if (nbCmd.Checked)
                {
                    uiCmd.Checked = Janus.Windows.UI.InheritableBoolean.True;
                }

                //产生UICommand时调用OnCreate方法,将主框架对象传递给插件对象
                nbCmd.OnCreate(this.m_Application);

                //使用委托机制处理Command的事件
                //所有的UICommand对象的Click事件均使用this.Command_Click方法处理
                uiCmd.Click += new Janus.Windows.UI.CommandBars.CommandEventHandler(uiCmd_Click);

                //将生成的UICommand添加到CommandManager中
                this.uiCommandManager.Commands.Add(uiCmd);
            }

            //遍历ITool对象集合
            foreach (KeyValuePair <string, NBGIS.PluginEngine.ITool> tool in Tools)
            {
                NBGIS.PluginEngine.ITool nbTool = tool.Value;

                Janus.Windows.UI.CommandBars.UICommand uiTool = new Janus.Windows.UI.CommandBars.UICommand();

                uiTool.CategoryName = nbTool.Category;
                uiTool.Text         = nbTool.Caption;
                uiTool.ToolTipText  = nbTool.Tooltip;
                uiTool.Image        = nbTool.Bitmap;
                uiTool.Key          = nbTool.ToString();

                if (!nbTool.Enabled)
                {
                    uiTool.Enabled = Janus.Windows.UI.InheritableBoolean.False;
                }
                if (nbTool.Checked)
                {
                    uiTool.Checked = Janus.Windows.UI.InheritableBoolean.True;
                }

                nbTool.OnCreate(this.m_Application);

                uiTool.Click += new Janus.Windows.UI.CommandBars.CommandEventHandler(uiTool_Click);

                this.uiCommandManager.Commands.Add(uiTool);
            }
        }
//
//    #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);

	}
Exemple #9
0
        private void ActivityMoreInfoLoad()
        {
            cmdJumpToActivity.Commands.Clear();
            atriumDB.ActivityRow[] actrs;
            actrs = (atriumDB.ActivityRow[])FM.DB.Activity.Select("docid=" + CurrentRow().DocId);

            //must be an attachment, loop through all attachments and find parent doc
            if (actrs.Length == 0)
            {
                docDB.AttachmentRow[] attrow = (docDB.AttachmentRow[])myDM.DB.Attachment.Select("attachmentid=" + CurrentRow().DocId);
                string acIDs = "";
                foreach (docDB.AttachmentRow ar in attrow)
                {
                    if (acIDs == "")
                    {
                        acIDs = ar.MsgId.ToString();
                    }
                    else
                    {
                        acIDs += ", " + ar.MsgId.ToString();
                    }
                }
                if (acIDs != "")
                {
                    actrs = (atriumDB.ActivityRow[])FM.DB.Activity.Select("docid in (" + acIDs + ")");
                }
            }
            if (actrs.Length == 0)
            {
                cmdJumpToActivity.Enabled = Janus.Windows.UI.InheritableBoolean.False;
            }
            else
            {
                cmdJumpToActivity.Enabled = Janus.Windows.UI.InheritableBoolean.True;
            }

            foreach (atriumDB.ActivityRow actr in actrs)
            {
                Janus.Windows.UI.CommandBars.UICommand newCmd;

                //add new items
                string key = "cmdActivityMoreInfo" + actr.ActivityId.ToString();
                if (cmdJumpToActivity.CommandManager.Commands.Contains(key))
                {
                    newCmd = cmdJumpToActivity.CommandManager.Commands[key];
                }
                else
                {
                    newCmd     = new Janus.Windows.UI.CommandBars.UICommand();
                    newCmd.Key = key;
                }
                ActivityConfig.ACSeriesRow[] acsrC = (ActivityConfig.ACSeriesRow[])FM.AtMng.acMng.DB.ACSeries.Select("acseriesid=" + actr.ACSeriesId, "");
                newCmd.Text = actr.ActivityDate.ToString("yyyy/MM/dd") + " - " + FM.AtMng.acMng.GetACSeries().GetNodeText(acsrC[0], (atriumBE.StepType)acsrC[0].StepType, false);
                newCmd.Tag  = actr.ActivityId;
                newCmd.ShowInCustomizeDialog = false;
                cmdJumpToActivity.Commands.Add(newCmd);
            }
            if (cmdJumpToActivity.Commands.Count == 1)
            {
                cmdJumpToActivity.Tag = cmdJumpToActivity.Commands[0].Tag;
                cmdJumpToActivity.Commands.Clear();
            }
            else
            {
                cmdJumpToActivity.Tag = null;
            }
        }
Exemple #10
0
 private void CommandFeatureCheck(atSecurity.SecurityManager.Features feature, Janus.Windows.UI.CommandBars.UICommand cmd)
 {
     if (AtMng.SecurityManager.CanExecute(0, feature) == atSecurity.SecurityManager.ExPermissions.No)
     {
         cmd.Enabled = Janus.Windows.UI.InheritableBoolean.False;
     }
 }