示例#1
0
        public void NewDashboard()
        {
            string dname = InputBox.Run("s_type_new_dashboard_name", "new dashboard");

            if (dname == null)
            {
                return;
            }
            string fn = Path.Combine(Core.DashboardsDirectory, dname + ".das");

            if (File.Exists(fn))
            {
                if (!StdDialog.ReallyOverwriteFile(fn))
                {
                    return;
                }
            }
            var dash = new DockPanelDashboard(fn);

            dash.Filter = GetFilter();
            dash.SaveToFile(fn);
            //dash.EnableDesign(true);
            DashboardManager.Instance.Addons.Add(dash);
            var pars = new DashboardInstanceParams {
                LayoutName = null
            };
            var win = dash.CreateControl(pars) as DashboardFrame;

            win.SetSelectedObject(this);
            MainWindow.Instance.OpenContent(win);
            MainWindow.Instance.ShowDocker(new PropertiesDockerFactory());
            MainWindow.Instance.ShowDocker(new ToolboxDockerFactory());
            dash.SetDesignFrame(win);
        }
示例#2
0
 public DashboardFrame(DockPanelDashboard dashboard, DashboardInstanceParams pars)
 {
     InitializeComponent();
     ConnPack.Cache            = CachePack.TreeCache;
     m_dashboard               = dashboard;
     HDesigner.UseToolBoxItem += HToolbox_UseToolBoxItem;
     HDesigner.ChangedWidget  += HDesigner_ChangedWidget;
     if (pars.LayoutName != null)
     {
         m_privateLayoutFile = Path.Combine(m_dashboard.PrivateLayoutDirectory, pars.LayoutName + ".dly");
     }
     Disposed         += DashboardFrame_Disposed;
     btnDesign.Visible = btnSettings.Visible = CustomDashboardsFeature.Allowed;
 }
示例#3
0
 public DashboardEditorFrame(DockPanelDashboard dashboard)
 {
     InitializeComponent();
     m_dashboard = dashboard;
     ReloadProps();
 }
示例#4
0
 public DashboardAllreadyDesignedError(DockPanelDashboard dashboard)
     : base(Texts.Get("s_dashboard_is_allready_designed$file", "file", Path.GetFileName(dashboard.AddonFileName)), null)
 {
 }