Example #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>();
                });
            });
        }
Example #2
0
 static void Main(string[] args)
 {
     GuiToolkit.CreateGui <MainWindow>();
 }