コード例 #1
0
ファイル: SimpleGuide.cs プロジェクト: anirnet/raf-manager
        public SimpleGuide(MainForm mainForm)
        {
            InitializeComponent();

            int bigPadding = 13;
            int smallPadding = 7;
            doDragDropLabel.Left = bigPadding;
            doDragDropLabel.Top = bigPadding;

            clickCheckBoxLabel.Left = bigPadding;
            clickCheckBoxLabel.Top = doDragDropLabel.Bottom + smallPadding;

            doPackLabel.Left = bigPadding;
            doPackLabel.Top = clickCheckBoxLabel.Bottom + smallPadding;

            this.ClientSize = new Size(
                Math.Max(
                    Math.Max(
                        doDragDropLabel.Right,
                        clickCheckBoxLabel.Right
                    ), doPackLabel.Right
                ) + bigPadding,
                doPackLabel.Bottom + bigPadding
            );

            this.mainForm = mainForm;

            t = new Timer();
            t.Interval = 100;
            t.Tick += new EventHandler(t_Tick);
            t.Start();
            this.FormClosed += new FormClosedEventHandler(SimpleGuide_FormClosed);
        }
コード例 #2
0
        public RMPropInterpreter(string scriptPath, MainForm mainForm)
        {
            variables["$OVERRIDEPACKTIME"]      = "FALSE";
            variables["$OVERRIDERESTORETIME"]   = "FALSE";

            Settings = new List<RMPropSetting>();
            string[] prefLines = File.ReadAllLines(scriptPath);

            this.scriptPath = scriptPath;
            this.scriptDir = new FileInfo(scriptPath).DirectoryName;
            this.mainForm = mainForm;

            Name = prefLines[0];
            Creator = prefLines[1];
            WebsiteURL = prefLines[2];
            
            //we actually pad an extra line to our lines, so we can have a 1-indexed file lines array
            this.lines = new string[] { "" }.Concat(prefLines).ToArray();
            ProcessToEndStatement(lines, 4, true);
        }