Example #1
0
        public MainForm(string arg)
        {
            InitializeComponent();

            this.Text = Application.ProductName + " v" + Application.ProductVersion;

            config        = new Config();
            textIP.Text   = config.getIPaddress();
            textPort.Text = config.getPort().ToString();
            if (config.getCheckExt())
            {
                bool setAssoc = FileAssociation.SetAssociation();
                if (config.getCheckExt() != setAssoc)
                {
                    config.setCheckExt(setAssoc);
                }
            }

            groupBox1.AllowDrop = true;
            pictureBox1.Image   = Properties.Resources.apk.ToBitmap();

            InitializeAdb();
            InitializeApk(arg);
            ScanDevice();
        }
Example #2
0
        private static void Main(string[] args)
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            string setArg = null;

            if (args.Length > 0)
            {
                foreach (string arg in args)
                {
                    if (arg.ToLower().EndsWith(".apk"))
                    {
                        setArg = arg;
                        break;
                    }
                }

                if (args[0].ToLower() == "-unreg")
                {
                    FileAssociation.UnRegister();
                }
            }
            Application.Run(new MainForm(setArg));
        }