Exemple #1
0
 // Start is called before the first frame update
 void Start()
 {
     BmobDebug.Register(print);
     BmobDebug.level = BmobDebug.Level.TRACE;
     Bmob            = gameObject.GetComponent <BmobUnity>();
     createData();
 }
Exemple #2
0
 public BmobBaseForm()
     : base()
 {
     bmob = new BmobWindows();
     Bmob.initialize("f69acbf2dd96fbaefdf9fd9793e93f66", "9a956445ff932b7d3f59b81af28cbe2a ");
     BmobDebug.Register(msg => { Debug.WriteLine(msg); });
 }
 // Use this for initialization
 void Start()
 {
     // Bmob.initialize("4414150cb439afdf684d37dc184e0f9f", "e1deb317442129c125b228ddf78e5f22");
     BmobDebug.Register(print);
     BmobDebug.level = BmobDebug.Level.TRACE;
     Bmob            = gameObject.GetComponent <BmobUnity> ();
 }
Exemple #4
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            RouteConfig.RegisterRoutes(RouteTable.Routes);

            BmobWindows Bmob = new BmobWindows();

            Bmob.initialize("69e01e36e091bee65ebeb8f93604f474", "8b0d500c09ff5c86cfcd3358b5104b05");
            BmobDebug.Register(msg => { Debug.WriteLine(msg); });   //注册调试工具
        }
Exemple #5
0
 /// <summary>
 /// Bmob初始化
 /// </summary>
 public BmobWindows BmobBuilder()
 {
     if (_bmobWindows == null)
     {
         _bmobWindows = new BmobWindows();
         _bmobWindows.initialize(PresetInfo.BmobApplicationId, PresetInfo.BmobRestApiKey);
         BmobDebug.Register(msg => { Debug.WriteLine("BmobDebug:" + msg); });
     }
     return(_bmobWindows);
 }
Exemple #6
0
        public BmobBaseForm()
            : base()
        {
            bmob = new BmobWindows();

            //初始化ApplicationId,这个ApplicationId需要更改为你自己的ApplicationId( http://www.bmob.cn 上注册登录之后,创建应用可获取到ApplicationId)
            Bmob.initialize("4414150cb439afdf684d37dc184e0f9f", "e1deb317442129c125b228ddf78e5f22");

            //注册调试工具
            BmobDebug.Register(msg => { Debug.WriteLine(msg); });
        }
Exemple #7
0
 protected override void OnEnable()
 {
     base.OnEnable();
     //Debuger.EnableLog = Config.enableDebug;
     Screen.fullScreen  = false;
     Screen.orientation = ScreenOrientation.Portrait;
     //Window.onFrameRateCoolDown = CustomFrameRateCoolDown;
     LoadFonts();
     BmobDebug.Register(print);
     BmobDebug.level = BmobDebug.Level.TRACE;
 }
Exemple #8
0
        public BmobBaseForm()
            : base()
        {
            bmob = new BmobWindows();

            //初始化ApplicationId,这个ApplicationId需要更改为你自己的ApplicationId( http://www.bmob.cn 上注册登录之后,创建应用可获取到ApplicationId)
            Bmob.initialize("69015a79796397f7701454336b84e0c4");

            //注册调试工具
            BmobDebug.Register(msg => { Debug.WriteLine(msg); });
        }
        public BmobInitializer()
            : base()
        {
            bmob = new BmobWindows();

            //初始化,这个ApplicationId/RestKey需要更改为你自己的ApplicationId/RestKey( http://www.bmob.cn 上注册登录之后,创建应用可获取到ApplicationId/RestKey)
            Bmob.initialize("69e01e36e091bee65ebeb8f93604f474", "8b0d500c09ff5c86cfcd3358b5104b05");

            //注册调试工具
            BmobDebug.Register(msg => { Debug.WriteLine(msg); });
        }
        public BmobBasePCForm()
            : base()
        {
            bmob     = new BmobWindows();
            _toolTip = new ToolTip();
            //初始化ApplicationId,这个ApplicationId需要更改为你自己的ApplicationId( http://www.bmob.cn 上注册登录之后,创建应用可获取到ApplicationId)
            Bmob.initialize("f8e94fde865de2270860606c30e4cdaa", "a586925dc4857f8f598ca6edbee17894");

            //注册调试工具
            BmobDebug.Register(msg => { Debug.WriteLine(msg); });
        }
Exemple #11
0
        public BmobBaseForm() : base()
        {
            InitializeComponent();

            bmob = new BmobWindows();

            //初始化ApplicationId,这个ApplicationId需要更改为你自己的ApplicationId( http://www.bmob.cn 上注册登录之后,创建应用可获取到ApplicationId)
            Bmob.initialize("5fcf8cca1113b5136fca2007de03892d", "");

            //注册调试工具
            BmobDebug.Register(msg => { Debug.WriteLine(msg); });
        }
        // 构造函数
        public MainPage()
        {
            InitializeComponent();

            Bmob.initialize("4414150cb439afdf684d37dc184e0f9f", "e1deb317442129c125b228ddf78e5f22");

            BmobDebug.Register(msg => { Debug.WriteLine(msg); });

            BmobWindowsPhone.PushChannel = "your_app_name_en";

            // 用于本地化 ApplicationBar 的示例代码
            //BuildLocalizedApplicationBar();
        }
Exemple #13
0
        void Start()
        {
            for (int i = 0; i < 25; i++)//利用tag将所有定义的游戏对象赋值
            {
                gameobject[i] = GameObject.FindWithTag(i.ToString());
            }
            for (int i = 0; i < 25; i++)                   //利用for循环获取每一个零件的原始x,y,z轴坐标位置,用于装配时直接归位
            {
                x[i] = gameobject[i].transform.position.x; //获取x轴坐标位置
                y[i] = gameobject[i].transform.position.y;
                z[i] = gameobject[i].transform.position.z;
            }
            gameobject[24].SetActive(false);
            liucheng = GameObject.Find("流程").GetComponent <Button>();
            chongzhi = GameObject.Find("Button").GetComponent <Button>();
            chongzhi.onClick.AddListener(() => OnClick(1));
            liucheng.onClick.AddListener(() => OnClick(2));
            chaizhuangtishi = GameObject.Find("拆装提示");

            BmobDebug.Register(print);
            BmobDebug.level = BmobDebug.Level.TRACE;
            Bmob            = gameObject.GetComponent <BmobUnity> ();
        }
Exemple #14
0
        protected override void OnEnable()
        {
            base.OnEnable();
            StartCoroutine(TapOnUtils.startGPS());
            //Debuger.EnableLog = Config.enableDebug;
            Screen.fullScreen  = false;
            Screen.orientation = ScreenOrientation.Portrait;
            //Window.onFrameRateCoolDown = CustomFrameRateCoolDown;
            LoadFonts();
            BmobDebug.Register(print);
            BmobDebug.level = BmobDebug.Level.TRACE;

            //if (Globals.instance == null) Debug.LogError("Global instance is null!");
            //if (Globals.instance.bmob == null) Debug.LogError("Global bmob is null!");
            if (Globals.instance.bmob == null)
            {
                GameObject t = GameObject.Find("Config");
                if (t == null)
                {
                    Debug.LogError("t is null");
                }
                else
                {
                    Globals.instance.bmob = t.GetComponent <BmobUnity>();
                }
            }
            if (Globals.instance.bmob == null)
            {
                Debug.LogError("Global bmob is null after!");
            }

            if (!Directory.Exists(Application.persistentDataPath + "//model"))
            {
                Directory.CreateDirectory(Application.persistentDataPath + "//model");
            }
        }
Exemple #15
0
 static BmobTestBase()
 {
     Bmob.initialize("4414150cb439afdf684d37dc184e0f9f", "e1deb317442129c125b228ddf78e5f22");
     BmobDebug.Register(msg => { Debug.WriteLine(msg); });
     BmobDebug.level = BmobDebug.Level.TRACE;
 }
Exemple #16
0
 /// <summary>
 /// Bmobs the init.
 /// </summary>
 void BmobInit()
 {
     BmobDebug.Register(print);
     BmobDebug.level = BmobDebug.Level.TRACE;
     Bmob            = GameObject.Find("Main Camera").GetComponent <BmobUnity> ();
 }
Exemple #17
0
 public static void InitBmob(string appkey, string reskey)
 {
     bmob.initialize(appkey, reskey);
     BmobDebug.Register(msg => { Debug.WriteLine(msg); });
 }
Exemple #18
0
 // Use this for initialization
 void Start()
 {
     BmobDebug.Register(print);
     BmobDebug.level = BmobDebug.Level.TRACE;
     Bmob            = GetComponent <BmobUnity>();
 }
Exemple #19
0
 private void Start()
 {
     Application.targetFrameRate = 60;
     BmobDebug.Register(Debug.Log);
 }
Exemple #20
0
 void Awake()
 {
     BmobDebug.Register(print);
     Bmob = gameObject.GetComponent <BmobUnity>() ?? gameObject.AddComponent <BmobUnity>();// gameObject.GetComponent<BmobUnity>();
     Bmob.ApplicationId = TestBmob.ApplicationId;
 }
        /// <summary>
        /// 初始化事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnInit_Click(object sender, EventArgs e)
        {
            BmobWindows Bmob = new BmobWindows();

            Bmob.initialize("38cd909fe640756176303b980453db55", "9e8a836ccfd013f87619b284a97de02c"); // 初始化Bmob客户端
            BmobDebug.Register(msg => { Debug.WriteLine(msg); });                                    // 用于调试输出请求参数

            BmobQuery query = new BmobQuery();

            //新建查询 查询Activityrecord表中所有的数据 按时间正向排序
            Bmob.Find <ReadFile>("Activityrecord", query, (resp, exception) =>
            {
                // 处理查询网络异常
                if (exception != null)
                {
                    return;
                }

                //对返回结果进行处理
                List <ReadFile> list = resp.results;
                foreach (var game in list)
                {
                    BmobFile record = game.record;
                    if (record != null)
                    {
                        if (File.Exists(record.filename))
                        {
                            Console.WriteLine("跳过:" + record.filename);
                        }
                        else
                        {
                            Console.WriteLine("下载:" + record.filename);
                            //调用HttpDownload进行非重复文件的下载,此处下载为同步下载 即一个下载完才会执行之后代码
                            HttpDownload(record.url, "./" + record.filename);
                        }
                    }
                }
                Console.WriteLine("开始写入");
                String[] files = Directory.GetFiles("./", "*.txt", SearchOption.AllDirectories);
                foreach (string f in files)
                {
                    if (File.Exists("db.txt"))
                    {
                        Console.WriteLine("it is existed");
                    }
                    else
                    {
                        FileStream fs = new FileStream("db.txt", FileMode.CreateNew);
                        fs.Close();
                    }
                    Console.WriteLine("查看" + f);
                    if (f.Contains("db.txt"))
                    {
                        continue;
                    }
                    string a = System.IO.File.ReadAllText(f);
                    string b = System.IO.File.ReadAllText("db.txt");
                    System.IO.File.WriteAllText("db.txt", a + "\r\n" + b);
                    File.Delete(f);
                }
                byte[] byData   = new byte[100];
                char[] charData = new char[1000];

                // 这里是Bmob的回调函数 也就是查询完之后执行下载了所有文件再执行此处的合并和InitChart
                // 所以需要将这个设置为False 否则会提示操作跨线程错误
                Control.CheckForIllegalCrossThreadCalls = false;
                InitChart();
                Read("db.txt");
            });
        }
Exemple #22
0
 void Awake()
 {
     BmobDebug.Register(print);
     BmobDebug.level = BmobDebug.Level.TRACE;
     bmobUnity       = GetComponent <BmobUnity>();
 }