예제 #1
0
        private int wizard_step;           //ウイザードのステップ番号

        //サブウインドウの初期化
        internal frmSubWindow(EnvData en, LogManager lg, OpenWindowType c_window) {
            InitializeComponent();

            this.env = en;
            this.log = lg;
            this.folder = env.Project.Folder;
            Init(c_window);
        }
예제 #2
0
        internal SvnManager(EnvData env){
            props = Path.GetDirectoryName(env.Documents.Path)+@"\.svn\props\"+Path.GetFileName(env.Documents.Path)+".svn-work";
            propBase = Path.GetDirectoryName(env.Documents.Path) + @"\.svn\prop-base\" + Path.GetFileName(env.Documents.Path) + ".svn-base";
            dotSvn = Path.GetDirectoryName(env.Documents.Path)+@"\.svn";

            isProps =File.Exists(props);
            isPropBase = File.Exists(propBase);
            isDotSvn = File.Exists(dotSvn);

            this.env = env;
        }
예제 #3
0
        //初期化
        private void frmMain_Load(object sender, EventArgs e) {
            this.Visible = false;
            dgvMain.ReadOnly = true;
            dgvMain.ContextMenuStrip = cmsTabsMenu;
            current_project = "";
            search_flag = false;
            is_multiple = false;
            tabs = new TabControl.TabPageCollection(tabControl);

            log = new LogManager(true);
            log.Write("dmpn Start--- " + DateTime.Now.ToShortDateString());

            log.Write("getEnvData " + DateTime.Now);
            env_data = new EnvData(new Documents("", ""), new Project("", false, "", false), new Master("", false, ""), this.Left, this.Top, this.Width, this.Height);
            GetEnvData();
            if (env_data.WindowLocation.X == 0 && env_data.WindowLocation.Y == 0) InitLocationAndSize();
            
            this.Location = env_data.WindowLocation;
            this.Size = env_data.WindowSize;

            //メニューバーは作成しない
            //log.Write("CreateUserMenuBar2");
            log.Write("OpenIndex " + DateTime.Now);
            log.Close();
            if (env_data.Documents.Path.Length == 0) {
                Documents doc = env_data.Documents;
                doc.Path = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + @"\docmaker.net2\index.xml";
                env_data.Documents = doc;
                Project pro = env_data.Project;
                pro.Folder=Path.GetDirectoryName(doc.Path)+@"\";
                env_data.Project = pro;
                env_data.SaveEnvData();
                if (!File.Exists(doc.Path)) {
                    next_step = NextStep.SPLASH;
                    MessageBox.Show("最初に環境設定をする必要があります。\n環境設定画面を表示します。\n You should set the environment first.", "警告", MessageBoxButtons.OK);
                    frm_sub = new frmSubWindow(env_data, log, OpenWindowType.ENV_SETTINGS);
                    frm_sub.FormClosed += new FormClosedEventHandler(frmSubWindow_Closed);
                    frm_sub.Show();
                    this.Enabled = false;
                } else
                    StartApplication();
            } else {
                StartApplication();
            }
        }
예제 #4
0
        //プロパティ
        #region Properties
        #endregion


        //メソッド
        #region Methods

        //環境設定ファイルの取得
        private void GetEnvData() {
            
            XmlSerializer seri = new XmlSerializer(typeof(EnvData));
            FileStream fs;

            if (File.Exists(EnvData.ENV_FILE_NAME)) {
                fs = new FileStream(EnvData.ENV_FILE_NAME, FileMode.Open);
                try {
                    env_data = (EnvData)seri.Deserialize(fs);
                } catch (Exception ex) {
                    MessageBox.Show(ex.Message, "エラー", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }

            } else {
                fs = new FileStream(EnvData.ENV_FILE_NAME, FileMode.Create);
                seri.Serialize(fs, env_data);
            }
            fs.Close();
        }