Ejemplo n.º 1
0
        public static void RegisterLogic2FreqGraph(CmdlineParser parser)
        {
            var cmdReplaceToken = parser.AddCommand("logic2-freq-graph", "display pulse freq graph", (logic2FreqGraph) =>
            {
                var _filename      = logic2FreqGraph.AddMandatoryParameter("filename", "Logic2 exported csv file");
                var _columnsFilter = logic2FreqGraph.AddMandatoryParameter("columnsFilter", "filter for csv columns (eg. \"Channel 0, Channel 2\")");

                logic2FreqGraph.OnCmdlineMatch(() =>
                {
                    var pathfilename = (string)_filename;
                    if (!File.Exists(pathfilename))
                    {
                        System.Console.WriteLine($"can't find file [{pathfilename}]");
                        return;
                    }

                    var columnsFilter = (string)_columnsFilter;

                    MainWindow.csv_pathfilename = pathfilename;
                    MainWindow.chansFilter      = columnsFilter;

                    GuiToolkit.CreateGui <MainWindow>();
                });
            });
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initialise the GuiService with a specific Toolkit
        /// </summary>
        /// <param name="guiToolkit">The toolkit to use</param>
        /// <remarks>This allows programs to use only one Toolkit, or provide a custom GUI (like an in-game interface)</remarks>
        public static void Init(GuiToolkit guiToolkit)
        {
            Log.Info("Using Toolkit {0} from {1}", guiToolkit.Name, guiToolkit.GetType().Assembly.FullName);

            _DefaultCulture = CultureInfo.CurrentCulture;
            _Culture        = _DefaultCulture;

            _Toolkit = guiToolkit;

            _Toolkit.Init();
        }
Ejemplo n.º 3
0
 static void Main(string[] args)
 {
     GuiToolkit.CreateGui <MainWindow>();
 }