コード例 #1
0
        /// <summary>
        /// Opens dialog to select file of extension
        /// </summary>
        /// <param name="__mode">Dialog mode</param>
        /// <param name="extension">The extension to filter files to</param>
        /// <param name="startPath">Initial file or directory to start selection from</param>
        /// <param name="comment">Aditional explanation</param>
        /// <param name="style">The style.</param>
        /// <param name="size">The size.</param>
        /// <returns>Selected path</returns>
        public static String openSelectFile(dialogSelectFileMode __mode, String extension = "*.*", String startPath = "", String comment = "", dialogStyle style = dialogStyle.redDialog, dialogSize size = dialogSize.fullScreenBox)
        {
            if (startPath == "")
            {
                startPath = appManager.Application.folder.path;
            }
            var format = new dialogFormatSettings(style, size);

            dialogSelectFile dialog = new dialogSelectFile(aceCommons.platform, startPath, __mode, extension, comment);

            inputResultCollection result = dialog.open(aceCommons.platform, format);

            FileSystemInfo defOutput;

            if (Path.HasExtension(startPath))
            {
                defOutput = new FileInfo(startPath);
            }
            else
            {
                defOutput = new DirectoryInfo(startPath);
            }

            defOutput = result.getResultObject <FileSystemInfo>(defOutput);

            return(defOutput.FullName);
        }
コード例 #2
0
        /// <summary>
        /// Interface refresh loop
        /// </summary>
        /// <returns></returns>
        protected override bool doApplicationLoop()
        {
            if (current == null)
            {
                return(false);
            }

            doUpdateInterface();

            Boolean doKeepReading = true;

            inputResultCollection results = new inputResultCollection();

            results.platform = platform;

            while (doKeepReading)
            {
                render(platform);
                results       = read(results);
                doKeepReading = results.doKeepReading();
            }

            results = execute(results);

            //  current.loop(this);

            return(doKeepRunning);
        }
コード例 #3
0
        /// <summary>
        /// #3 Vrsi rad nakon sto je obradjen ulaz
        /// </summary>
        public override inputResultCollection execute(inputResultCollection __inputs)
        {
            application.goBack();


            return(__inputs);
        }
コード例 #4
0
        /// <summary>
        /// Open sequenca koja se izvrsava unutar open poziva
        /// </summary>
        /// <param name="platform"></param>
        /// <param name="format"> </param>
        protected inputResultCollection openSequence(IPlatform platform, dialogFormatSettings format)
        {
            Boolean doKeepReading = true;
            Boolean doKeepOpened  = false;


            // format.apply(this, platform);
            inputResultCollection results = null;

            do
            {
                refresh();

                results          = new inputResultCollection();
                results.platform = platform;

                while (doKeepReading)
                {
                    render(platform, true);
                    results       = read(results);
                    doKeepReading = results.doKeepReading();
                }

                results = execute(results);
            } while (doKeepOpened);

            return(results);
        }
コード例 #5
0
        /// <summary>
        /// #3 Vrsi rad nakon sto je obradjen ulaz
        /// </summary>
        public override inputResultCollection execute(inputResultCollection __inputs)
        {
            var results = __inputs;



            return(results);
        }
コード例 #6
0
        /// <summary>
        /// Executes the screen-specific logic
        /// </summary>
        /// <param name="__inputs">The inputs.</param>
        /// <returns></returns>
        public override inputResultCollection execute(inputResultCollection __inputs)
        {
            var menuResult   = __inputs.getBySection(menuSection);
            var selectedItem = menuResult.result as aceMenuItem;

            selectedItem.executeMeta();

            return(__inputs);
        }
コード例 #7
0
        /// <summary>
        /// #2 Reads the input
        /// </summary>
        /// <param name="__results">todo: describe __results parameter on read</param>
        protected virtual inputResultCollection read(inputResultCollection __results)
        {
            if (__results == null)
            {
                __results = new inputResultCollection();
            }

            __results.platform = platform;

            return(current.read(__results));
        }
コード例 #8
0
        /// <summary>
        /// #3 Forwards the input result to the <see cref="current"/> screen
        /// </summary>
        /// <param name="__inputs">todo: describe __inputs parameter on execute</param>
        protected virtual inputResultCollection execute(inputResultCollection __inputs)
        {
            __inputs.platform = platform;

            if (__inputs.doIfKey("Escape"))
            {
                goBack();
                return(__inputs);
            }

            return(current.execute(__inputs));
        }
コード例 #9
0
        /// <summary>
        /// #2 Očitava ulaz
        /// </summary>
        public virtual inputResultCollection read(inputResultCollection __results)
        {
            if (__results == null)
            {
                __results = new inputResultCollection();
            }

            var min = __results.getBySection(this);
            var rd  = read(__results.platform, min);

            __results.AddUniqueSection(rd);

            return(__results);
        }
コード例 #10
0
        /// <summary>
        /// #2 Očitava ulaz
        /// </summary>
        public override inputResultCollection read(inputResultCollection __results)
        {
            if (__results == null)
            {
                __results = new inputResultCollection();
            }

            var min = __results.getBySection(menuSection);

            if (menuSection == null)
            {
            }
            else
            {
                var rd = menuSection.read(__results.platform, min);
                __results.AddUniqueSection(rd);
            }

            return(__results);
        }
コード例 #11
0
        /// <summary>
        /// #2 Očitava ulaz -- reseno na nivou aceTErminalScreenBase
        /// </summary>
        public inputResultCollection read(inputResultCollection __results)
        {
            if (__results == null)
            {
                __results = new inputResultCollection();
            }

            foreach (var l in layers)
            {
                if (l is IRead)
                {
                    IRead ir = l as IRead;

                    __results = ir.read(__results);

                    //  var rs = __results.getBySection(ir);
                    // rs = ir.read(__results.platform, rs);
                    //   __results.AddUniqueSection(rs);
                }
            }

            return(__results);
        }
コード例 #12
0
        public override inputResultCollection execute(inputResultCollection __inputs)
        {
            //var dmi = __inputs.resultInFocus.result as aceMenuItem;
            //var dmie = dmi.metaObject;

            //if (dmie is dialogMenuItem)
            //{
            //    dialogMenuItem dialogTask = (dialogMenuItem)dmie;
            //    switch (dialogTask)
            //    {
            //        case dialogMenuItem.Copy:

            //            break;
            //        case dialogMenuItem.Save:

            //            break;
            //        case dialogMenuItem.Close:
            //            break;
            //    }
            //}

            return(__inputs);
        }
コード例 #13
0
 /// <summary>
 /// #3 Vrsi rad nakon sto je obradjen ulaz
 /// </summary>
 public virtual inputResultCollection execute(inputResultCollection __inputs)
 {
     return(__inputs);
 }
コード例 #14
0
 /// <summary>
 /// Executes the screen-specific logic
 /// </summary>
 /// <param name="__inputs">The inputs.</param>
 /// <returns></returns>
 public abstract inputResultCollection execute(inputResultCollection __inputs);
コード例 #15
0
 /// <summary>
 /// Reads the user input
 /// </summary>
 /// <param name="__results">The results.</param>
 /// <returns></returns>
 public abstract inputResultCollection read(inputResultCollection __results);