Пример #1
0
 public SelectChannelsForm()
 {
     InitializeComponent();
     ResourcesReader.SetControlPropertyHelper(this);
     GetChannelNames();
     SetCheckedNodes(Channels, treeChannels.Nodes);
 }
Пример #2
0
 protected override void OnLoad(EventArgs e)
 {
     base.OnLoad(e);
     if (!this.DesignMode)
     {
         ResourcesReader.SetControlPropertyHelper(this);
     }
 }
Пример #3
0
 protected override void OnCreateControl()
 {
     base.OnCreateControl();
     if (!this.DesignMode)
     {
         ResourcesReader.SetControlPropertyHelper(this);
     }
 }
 protected override void OnLoad(EventArgs e)
 {
     base.OnLoad(e);
     if (!this.DesignMode)
     {
         ResourcesReader.SetControlPropertyHelper(this);
     }
     this.labelProductName.Text = AssemblyProduct;
     this.labelVersion.Text     = String.Format("Version: {0}", AssemblyVersion);
     this.labelCopyright.Text   = AssemblyCopyright;
     this.labelCompanyName.Text = AssemblyCompany;
 }
Пример #5
0
        public MdiTmpltDesignForm(string tmpltID)
        {
            ResourcesReader.SetControlPropertyHelper(this);
            TmpltID           = tmpltID;
            SnipDesignerForms = new List <Form>();
            InitializeComponent();
            this.ShowIcon = true;
            this.Icon     = Icon.FromHandle(ResourceService.GetResourceImage("tree.img.templet").GetHicon());
            TmpltSimpleExXmlElement tmpltEle = Service.Sdsite.CurrentDocument.GetTmpltElementById(tmpltID);

            if (tmpltEle == null)
            {
                MessageService.Show("文件不存在,打开失败!", MessageBoxButtons.OK, MessageBoxIcon.Error);
                BeginClose();
                return;
            }
            this.Text = tmpltEle.Title;
            Service.Sdsite.CurrentDocument.ElementTitleChanged += new EventHandler <ChangeTitleEventArgs>(CurrentDocument_ElementTitleChanged);
            Service.Workbench.WorkDocumentNewOpened            += new EventHandler <EventArgs <FormData> >(WorkbenchService_WorkDocumentNewOpened);

            Debug.Assert(!string.IsNullOrEmpty(TmpltID));
            TmpltSimpleExXmlElement ele = Service.Sdsite.CurrentDocument.GetTmpltElementById(TmpltID);

            if (ele == null || !File.Exists(ele.AbsoluteFilePath))
            {
                MessageService.Show(StringParserService.Parse("${res:tmpltDesign.tmpltDrawPanel.message.mdiFormLoad}"), MessageBoxButtons.OK, MessageBoxIcon.Error);
                BeginClose();
                return;
            }
            TmpltDoc = ele.GetIndexXmlDocument();

            InitTmpltInfo();
            TmpltDesign.Dock = DockStyle.Fill;
            this.Controls.Add(TmpltDesign);
            TmpltDesign.BringToFront();
        }