コード例 #1
0
        /// <summary>
        /// constructor for the main form
        /// </summary>
        public MainForm(string fileName)
        {
            InitializeComponent();
            cueSheetListView.SmallImageList = new ImageList();
            //use reflection to add the images in the assembly to the image list
            System.Reflection.Assembly thisExe;
            thisExe = System.Reflection.Assembly.GetExecutingAssembly();
            string[] resources = thisExe.GetManifestResourceNames();
            System.IO.Stream file = thisExe.GetManifestResourceStream("CueSheetGenerator.left.ico");
            cueSheetListView.SmallImageList.Images.Add(new Bitmap(Image.FromStream(file)));
            file = thisExe.GetManifestResourceStream("CueSheetGenerator.right.ico");
            cueSheetListView.SmallImageList.Images.Add(new Bitmap(Image.FromStream(file)));
            file = thisExe.GetManifestResourceStream("CueSheetGenerator.straight.ico");
            cueSheetListView.SmallImageList.Images.Add(new Bitmap(Image.FromStream(file)));
            file = thisExe.GetManifestResourceStream("CueSheetGenerator.poi.ico");
            cueSheetListView.SmallImageList.Images.Add(new Bitmap(Image.FromStream(file)));

            cueSheetListView.Columns.Add("Turn #", 48);
            cueSheetListView.Columns.Add("Distance", 62);
            cueSheetListView.Columns.Add("Turn", 48);
            cueSheetListView.Columns.Add("Street Name", -2);

            //may need to add a method here to make the columns visible on mac

            _ps = new PathfinderStrategy();
            _ps.finishedProcessing += updateDirections;
            finishedProcessing += updateDirections;
            _ps.finishedProcessing += reEnableControls;
            enableControlls += reEnableControls;
            _ps.processedLocation += updateProgressBar;
            processedLocation += updateProgressBar;
            this.Show();
            if (fileName != null) openGpsFile(fileName);
            else updateRideMap(true);
        }
コード例 #2
0
        /// <summary>
        /// constructor for the main form
        /// </summary>
        public MainForm(string fileName)
        {
            InitializeComponent();
            cueSheetListView.SmallImageList = new ImageList();
            //use reflection to add the images in the assembly to the image list
            System.Reflection.Assembly thisExe;
            thisExe = System.Reflection.Assembly.GetExecutingAssembly();
            string[]         resources = thisExe.GetManifestResourceNames();
            System.IO.Stream file      = thisExe.GetManifestResourceStream("CueSheetGenerator.left.ico");
            cueSheetListView.SmallImageList.Images.Add(new Bitmap(Image.FromStream(file)));
            file = thisExe.GetManifestResourceStream("CueSheetGenerator.right.ico");
            cueSheetListView.SmallImageList.Images.Add(new Bitmap(Image.FromStream(file)));
            file = thisExe.GetManifestResourceStream("CueSheetGenerator.straight.ico");
            cueSheetListView.SmallImageList.Images.Add(new Bitmap(Image.FromStream(file)));
            file = thisExe.GetManifestResourceStream("CueSheetGenerator.poi.ico");
            cueSheetListView.SmallImageList.Images.Add(new Bitmap(Image.FromStream(file)));


            cueSheetListView.Columns.Add("Turn #", 48);
            cueSheetListView.Columns.Add("Distance", 62);
            cueSheetListView.Columns.Add("Turn", 48);
            cueSheetListView.Columns.Add("Street Name", -2);

            //may need to add a method here to make the columns visible on mac

            _ps = new PathfinderStrategy();
            _ps.finishedProcessing += updateDirections;
            finishedProcessing     += updateDirections;
            _ps.finishedProcessing += reEnableControls;
            enableControlls        += reEnableControls;
            _ps.processedLocation  += updateProgressBar;
            processedLocation      += updateProgressBar;
            this.Show();
            if (fileName != null)
            {
                openGpsFile(fileName);
            }
            else
            {
                updateRideMap(true);
            }
        }