Exemplo n.º 1
0
 /// <summary>
 ///     切换Tab的时候,必须切换当前对象
 /// </summary>
 public FrmMain()
 {
     InitializeComponent();
     GetSystemIcon.InitMainTreeImage();
     GetSystemIcon.InitTabViewImage();
     trvsrvlst.ImageList = GetSystemIcon.MainTreeImage;
     tabView.ImageList   = GetSystemIcon.TabViewImage;
     SetMenuImage();
     GuiConfig.Translateform(this);
     if (!GuiConfig.IsUseDefaultLanguage)
     {
         //其他控件
         statusStripMain.Items[0].Text = GuiConfig.GetText(TextType.MainStatusBarTextReady);
     }
     //Init ToolBar
     InitToolBar();
     Text += "  " + SystemManager.Version;
     Icon  = Icon.ExtractAssociatedIcon(Application.ExecutablePath);
     if (SystemManager.MonoMode)
     {
         Text += " MONO";
     }
     //新建文档的文档获得方法注入
     CtlDocumentView._getDocument = () =>
     {
         var frmInsertDoc = new FrmNewDocument();
         Utility.OpenForm(frmInsertDoc, false, true);
         return(frmInsertDoc.MBsonDocument);
     };
 }
Exemplo n.º 2
0
 /// <summary>
 ///     增加条件
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void cmdAddCondition_Click(object sender, EventArgs e)
 {
     try
     {
         var frmInsertDoc = new FrmNewDocument();
         Utility.OpenForm(frmInsertDoc, false, true);
         _aggrArray.Add(frmInsertDoc.MBsonDocument);
         FillAggreationTreeview();
     }
     catch (Exception ex)
     {
         Utility.ExceptionDeal(ex);
     }
 }