Пример #1
0
        public CreateClassfrm(CreateClassFrmSettings setting, PluginMain plugin)
        {
            InitWithSettings(setting);
            Project project = (Project)PluginBase.CurrentProject;

            if (project == null)
            {
                asc = new GenerateClass();
                SetLanguage("as3");
                return;
            }

            SetLanguage(project.Language.ToLower() );
            ScintillaNet.ScintillaControl sci = ASCompletion.Context.ASContext.CurSciControl;

            if (sci != null)
            {
                txtFilePath.Text = Path.GetDirectoryName(sci.FileName);
            }

            if (txtFilePath.Text.Length==0 )
            {
                txtFilePath.Text = project.AbsoluteClasspaths[0];
            }

            asc = new GenerateClass();
            txtNameClass.TabIndex = 0;
        }
Пример #2
0
        public CreateClassfrm(string className,Boolean isSCiContext, CreateClassFrmSettings setting, string language, PluginMain plugin)
        {
            _isSCiContext = isSCiContext;
            InitWithSettings(setting);
            txtNameClass.Text = className;
            txtNameClass.Enabled = false;
            btnCreateClass.TabIndex = 0;
            chkClose.Visible = false;
            btnSaveSetting.Visible = true;

            // Set current path
            string path = Path.GetDirectoryName(ASCompletion.Context.ASContext.CurSciControl.FileName);
            //MessageBox.Show(path);
            txtFilePath.Text = path;

            asc = new GenerateClass();
            SetLanguage(language);
        }